@@ -20,6 +20,7 @@ import (
20
20
"github.com/stretchr/testify/assert"
21
21
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
22
22
23
+ "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1"
23
24
"github.com/open-telemetry/opentelemetry-operator/apis/v1alpha2"
24
25
)
25
26
@@ -60,13 +61,12 @@ func TestDefaultAnnotations(t *testing.T) {
60
61
61
62
func TestNonDefaultPodAnnotation (t * testing.T ) {
62
63
// prepare
63
- otelcol := v1alpha1 .OpenTelemetryCollector {
64
+ otelcol := v1alpha2 .OpenTelemetryCollector {
64
65
ObjectMeta : metav1.ObjectMeta {
65
66
Name : "my-instance" ,
66
67
Namespace : "my-ns" ,
67
68
},
68
- Spec : v1alpha1.OpenTelemetryCollectorSpec {
69
- Config : "test" ,
69
+ Spec : v1alpha2.OpenTelemetryCollectorSpec {
70
70
Observability : v1alpha1.ObservabilitySpec {
71
71
Metrics : v1alpha1.MetricsConfigSpec {
72
72
DisablePrometheusAnnotations : true ,
@@ -83,12 +83,12 @@ func TestNonDefaultPodAnnotation(t *testing.T) {
83
83
assert .NotContains (t , annotations , "prometheus.io/scrape" , "Prometheus scrape annotation should not exist" )
84
84
assert .NotContains (t , annotations , "prometheus.io/port" , "Prometheus port annotation should not exist" )
85
85
assert .NotContains (t , annotations , "prometheus.io/path" , "Prometheus path annotation should not exist" )
86
- assert .Equal (t , "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 " , annotations ["opentelemetry-operator-config/sha256" ])
86
+ assert .Equal (t , "fbcdae6a02b2115cd5ca4f34298202ab041d1dfe62edebfaadb48b1ee178231d " , annotations ["opentelemetry-operator-config/sha256" ])
87
87
//verify propagation from metadata.annotations to spec.template.spec.metadata.annotations
88
88
assert .NotContains (t , podAnnotations , "prometheus.io/scrape" , "Prometheus scrape annotation should not exist in pod annotations" )
89
89
assert .NotContains (t , podAnnotations , "prometheus.io/port" , "Prometheus port annotation should not exist in pod annotations" )
90
90
assert .NotContains (t , podAnnotations , "prometheus.io/path" , "Prometheus path annotation should not exist in pod annotations" )
91
- assert .Equal (t , "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 " , podAnnotations ["opentelemetry-operator-config/sha256" ])
91
+ assert .Equal (t , "fbcdae6a02b2115cd5ca4f34298202ab041d1dfe62edebfaadb48b1ee178231d " , podAnnotations ["opentelemetry-operator-config/sha256" ])
92
92
}
93
93
94
94
func TestUserAnnotations (t * testing.T ) {
0 commit comments