Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: odubajDT <[email protected]>
  • Loading branch information
odubajDT committed Jan 10, 2025
1 parent 31eebe1 commit aac581c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
36 changes: 19 additions & 17 deletions processor/k8sattributesprocessor/e2e_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

//go:build e2e

package k8sattributesprocessor

import (
Expand All @@ -19,7 +21,7 @@ import (
"go.opentelemetry.io/collector/consumer/consumertest"
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pipeline"
"go.opentelemetry.io/collector/pipeline/pipelineprofiles"
"go.opentelemetry.io/collector/pipeline/xpipeline"
"go.opentelemetry.io/collector/receiver/otlpreceiver"
"go.opentelemetry.io/collector/receiver/receivertest"
"go.opentelemetry.io/collector/receiver/xreceiver"
Expand Down Expand Up @@ -419,7 +421,7 @@ func TestE2E_ClusterRBAC(t *testing.T) {
},
{
name: "profiles-job",
dataType: pipelineprofiles.SignalProfiles,
dataType: xpipeline.SignalProfiles,
service: "test-profiles-job",
attrs: map[string]*expectedValue{
"k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-profiles-job-[a-z0-9]*"),
Expand All @@ -444,7 +446,7 @@ func TestE2E_ClusterRBAC(t *testing.T) {
},
{
name: "profiles-statefulset",
dataType: pipelineprofiles.SignalProfiles,
dataType: xpipeline.SignalProfiles,
service: "test-profiles-statefulset",
attrs: map[string]*expectedValue{
"k8s.pod.name": newExpectedValue(equal, "telemetrygen-"+testID+"-profiles-statefulset-0"),
Expand All @@ -468,7 +470,7 @@ func TestE2E_ClusterRBAC(t *testing.T) {
},
{
name: "profiles-deployment",
dataType: pipelineprofiles.SignalProfiles,
dataType: xpipeline.SignalProfiles,
service: "test-profiles-deployment",
attrs: map[string]*expectedValue{
"k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-profiles-deployment-[a-z0-9]*-[a-z0-9]*"),
Expand All @@ -495,7 +497,7 @@ func TestE2E_ClusterRBAC(t *testing.T) {
},
{
name: "profiles-daemonset",
dataType: pipelineprofiles.SignalProfiles,
dataType: xpipeline.SignalProfiles,
service: "test-profiles-daemonset",
attrs: map[string]*expectedValue{
"k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-profiles-daemonset-[a-z0-9]*"),
Expand Down Expand Up @@ -529,7 +531,7 @@ func TestE2E_ClusterRBAC(t *testing.T) {
scanMetricsForAttributes(t, metricsConsumer, tc.service, tc.attrs)
case pipeline.SignalLogs:
scanLogsForAttributes(t, logsConsumer, tc.service, tc.attrs)
case pipelineprofiles.SignalProfiles:
case xpipeline.SignalProfiles:
scanProfilesForAttributes(t, profilesConsumer, tc.service, tc.attrs)
default:
t.Fatalf("unknown data type %s", tc.dataType)
Expand Down Expand Up @@ -668,7 +670,7 @@ func TestE2E_NamespacedRBAC(t *testing.T) {
},
{
name: "profiles-deployment",
dataType: pipelineprofiles.SignalProfiles,
dataType: xpipeline.SignalProfiles,
service: "test-profiles-deployment",
attrs: map[string]*expectedValue{
"k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-profiles-deployment-[a-z0-9]*-[a-z0-9]*"),
Expand Down Expand Up @@ -701,7 +703,7 @@ func TestE2E_NamespacedRBAC(t *testing.T) {
scanMetricsForAttributes(t, metricsConsumer, tc.service, tc.attrs)
case pipeline.SignalLogs:
scanLogsForAttributes(t, logsConsumer, tc.service, tc.attrs)
case pipelineprofiles.SignalProfiles:
case xpipeline.SignalProfiles:
scanProfilesForAttributes(t, profilesConsumer, tc.service, tc.attrs)
default:
t.Fatalf("unknown data type %s", tc.dataType)
Expand Down Expand Up @@ -864,7 +866,7 @@ func TestE2E_MixRBAC(t *testing.T) {
},
{
name: "profiles-deployment",
dataType: pipelineprofiles.SignalProfiles,
dataType: xpipeline.SignalProfiles,
service: "test-profiles-deployment",
attrs: map[string]*expectedValue{
"k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-profiles-deployment-[a-z0-9]*-[a-z0-9]*"),
Expand Down Expand Up @@ -900,7 +902,7 @@ func TestE2E_MixRBAC(t *testing.T) {
scanMetricsForAttributes(t, metricsConsumer, tc.service, tc.attrs)
case pipeline.SignalLogs:
scanLogsForAttributes(t, logsConsumer, tc.service, tc.attrs)
case pipelineprofiles.SignalProfiles:
case xpipeline.SignalProfiles:
scanProfilesForAttributes(t, profilesConsumer, tc.service, tc.attrs)
default:
t.Fatalf("unknown data type %s", tc.dataType)
Expand Down Expand Up @@ -1043,7 +1045,7 @@ func TestE2E_NamespacedRBACNoPodIP(t *testing.T) {
},
{
name: "profiles-deployment",
dataType: pipelineprofiles.SignalProfiles,
dataType: xpipeline.SignalProfiles,
service: "test-profiles-deployment",
attrs: map[string]*expectedValue{
"k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-profiles-deployment-[a-z0-9]*-[a-z0-9]*"),
Expand Down Expand Up @@ -1076,7 +1078,7 @@ func TestE2E_NamespacedRBACNoPodIP(t *testing.T) {
scanMetricsForAttributes(t, metricsConsumer, tc.service, tc.attrs)
case pipeline.SignalLogs:
scanLogsForAttributes(t, logsConsumer, tc.service, tc.attrs)
case pipelineprofiles.SignalProfiles:
case xpipeline.SignalProfiles:
scanProfilesForAttributes(t, profilesConsumer, tc.service, tc.attrs)
default:
t.Fatalf("unknown data type %s", tc.dataType)
Expand Down Expand Up @@ -1465,7 +1467,7 @@ func TestE2E_ClusterRBACCollectorStartAfterTelemetryGen(t *testing.T) {
},
{
name: "profiles-job",
dataType: pipelineprofiles.SignalProfiles,
dataType: xpipeline.SignalProfiles,
service: "test-profiles-job",
attrs: map[string]*expectedValue{
"k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-profiles-job-[a-z0-9]*"),
Expand All @@ -1490,7 +1492,7 @@ func TestE2E_ClusterRBACCollectorStartAfterTelemetryGen(t *testing.T) {
},
{
name: "profiles-statefulset",
dataType: pipelineprofiles.SignalProfiles,
dataType: xpipeline.SignalProfiles,
service: "test-profiles-statefulset",
attrs: map[string]*expectedValue{
"k8s.pod.name": newExpectedValue(equal, "telemetrygen-"+testID+"-profiles-statefulset-0"),
Expand All @@ -1514,7 +1516,7 @@ func TestE2E_ClusterRBACCollectorStartAfterTelemetryGen(t *testing.T) {
},
{
name: "profiles-deployment",
dataType: pipelineprofiles.SignalProfiles,
dataType: xpipeline.SignalProfiles,
service: "test-profiles-deployment",
attrs: map[string]*expectedValue{
"k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-profiles-deployment-[a-z0-9]*-[a-z0-9]*"),
Expand All @@ -1541,7 +1543,7 @@ func TestE2E_ClusterRBACCollectorStartAfterTelemetryGen(t *testing.T) {
},
{
name: "profiles-daemonset",
dataType: pipelineprofiles.SignalProfiles,
dataType: xpipeline.SignalProfiles,
service: "test-profiles-daemonset",
attrs: map[string]*expectedValue{
"k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-profiles-daemonset-[a-z0-9]*"),
Expand Down Expand Up @@ -1575,7 +1577,7 @@ func TestE2E_ClusterRBACCollectorStartAfterTelemetryGen(t *testing.T) {
scanMetricsForAttributes(t, metricsConsumer, tc.service, tc.attrs)
case pipeline.SignalLogs:
scanLogsForAttributes(t, logsConsumer, tc.service, tc.attrs)
case pipelineprofiles.SignalProfiles:
case xpipeline.SignalProfiles:
scanProfilesForAttributes(t, profilesConsumer, tc.service, tc.attrs)
default:
t.Fatalf("unknown data type %s", tc.dataType)
Expand Down
2 changes: 1 addition & 1 deletion processor/k8sattributesprocessor/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ require (
go.opentelemetry.io/collector/pdata v1.23.0
go.opentelemetry.io/collector/pdata/pprofile v0.117.0
go.opentelemetry.io/collector/pipeline v0.117.0
go.opentelemetry.io/collector/pipeline/pipelineprofiles v0.116.0
go.opentelemetry.io/collector/pipeline/xpipeline v0.117.0
go.opentelemetry.io/collector/processor v0.117.0
go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.117.0
go.opentelemetry.io/collector/processor/processortest v0.117.0
Expand Down
4 changes: 2 additions & 2 deletions processor/k8sattributesprocessor/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit aac581c

Please sign in to comment.