Skip to content

Commit

Permalink
use naming
Browse files Browse the repository at this point in the history
  • Loading branch information
matthagenbuch committed May 7, 2024
1 parent dfbbc3b commit 6095564
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions internal/manifests/collector/configmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"testing"

"github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils"
"github.com/open-telemetry/opentelemetry-operator/internal/naming"
"github.com/stretchr/testify/assert"
)

Expand Down Expand Up @@ -57,8 +58,7 @@ service:

param := deploymentParams()
hash, _ := manifestutils.GetConfigMapSHA(param.OtelCol.Spec.Config)
hash = hash[:8]
expectedName := "test-collector-" + hash
expectedName := naming.ConfigMap("test", hash)

expectedLables["app.kubernetes.io/component"] = "opentelemetry-collector"
expectedLables["app.kubernetes.io/name"] = expectedName
Expand Down Expand Up @@ -101,8 +101,7 @@ service:
assert.NoError(t, err)

hash, _ := manifestutils.GetConfigMapSHA(param.OtelCol.Spec.Config)
hash = hash[:8]
expectedName := "test-collector-" + hash
expectedName := naming.ConfigMap("test", hash)

expectedLables["app.kubernetes.io/component"] = "opentelemetry-collector"
expectedLables["app.kubernetes.io/name"] = expectedName
Expand Down

0 comments on commit 6095564

Please sign in to comment.