Skip to content

Commit feaa1e1

Browse files
committed
internal/manifests/collector: fix test
Signed-off-by: Benedikt Bongartz <[email protected]>
1 parent f7c7006 commit feaa1e1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

internal/manifests/collector/annotations_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"github.com/stretchr/testify/assert"
2121
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2222

23+
"github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1"
2324
"github.com/open-telemetry/opentelemetry-operator/apis/v1alpha2"
2425
)
2526

@@ -60,13 +61,12 @@ func TestDefaultAnnotations(t *testing.T) {
6061

6162
func TestNonDefaultPodAnnotation(t *testing.T) {
6263
// prepare
63-
otelcol := v1alpha1.OpenTelemetryCollector{
64+
otelcol := v1alpha2.OpenTelemetryCollector{
6465
ObjectMeta: metav1.ObjectMeta{
6566
Name: "my-instance",
6667
Namespace: "my-ns",
6768
},
68-
Spec: v1alpha1.OpenTelemetryCollectorSpec{
69-
Config: "test",
69+
Spec: v1alpha2.OpenTelemetryCollectorSpec{
7070
Observability: v1alpha1.ObservabilitySpec{
7171
Metrics: v1alpha1.MetricsConfigSpec{
7272
DisablePrometheusAnnotations: true,
@@ -83,12 +83,12 @@ func TestNonDefaultPodAnnotation(t *testing.T) {
8383
assert.NotContains(t, annotations, "prometheus.io/scrape", "Prometheus scrape annotation should not exist")
8484
assert.NotContains(t, annotations, "prometheus.io/port", "Prometheus port annotation should not exist")
8585
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"])
8787
//verify propagation from metadata.annotations to spec.template.spec.metadata.annotations
8888
assert.NotContains(t, podAnnotations, "prometheus.io/scrape", "Prometheus scrape annotation should not exist in pod annotations")
8989
assert.NotContains(t, podAnnotations, "prometheus.io/port", "Prometheus port annotation should not exist in pod annotations")
9090
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"])
9292
}
9393

9494
func TestUserAnnotations(t *testing.T) {

0 commit comments

Comments
 (0)