From aac581ccf67f3cd6fab3b6635e1d22a935cdba63 Mon Sep 17 00:00:00 2001 From: odubajDT Date: Fri, 10 Jan 2025 08:47:23 +0100 Subject: [PATCH] fix test Signed-off-by: odubajDT --- processor/k8sattributesprocessor/e2e_test.go | 36 +++++++++++--------- processor/k8sattributesprocessor/go.mod | 2 +- processor/k8sattributesprocessor/go.sum | 4 +-- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/processor/k8sattributesprocessor/e2e_test.go b/processor/k8sattributesprocessor/e2e_test.go index 86145a0f5ce91..4b6f66c35e640 100644 --- a/processor/k8sattributesprocessor/e2e_test.go +++ b/processor/k8sattributesprocessor/e2e_test.go @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +//go:build e2e + package k8sattributesprocessor import ( @@ -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" @@ -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]*"), @@ -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"), @@ -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]*"), @@ -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]*"), @@ -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) @@ -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]*"), @@ -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) @@ -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]*"), @@ -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) @@ -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]*"), @@ -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) @@ -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]*"), @@ -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"), @@ -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]*"), @@ -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]*"), @@ -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) diff --git a/processor/k8sattributesprocessor/go.mod b/processor/k8sattributesprocessor/go.mod index 30c6bdf384f04..f77c97494f975 100644 --- a/processor/k8sattributesprocessor/go.mod +++ b/processor/k8sattributesprocessor/go.mod @@ -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 diff --git a/processor/k8sattributesprocessor/go.sum b/processor/k8sattributesprocessor/go.sum index 704eef725eac9..b3773e258c735 100644 --- a/processor/k8sattributesprocessor/go.sum +++ b/processor/k8sattributesprocessor/go.sum @@ -1281,8 +1281,8 @@ go.opentelemetry.io/collector/pdata/testdata v0.117.0 h1:ainpacShKHaDkPK6lcvgJ0a go.opentelemetry.io/collector/pdata/testdata v0.117.0/go.mod h1:LZAymmRKHQEqJqJUSO15rej3+V1rNRyBMF5mWCKCMBY= go.opentelemetry.io/collector/pipeline v0.117.0 h1:CSv0Dd3n9AQNQ73e7PdEkgexkSMRZliKATxkoZKUFcY= go.opentelemetry.io/collector/pipeline v0.117.0/go.mod h1:qE3DmoB05AW0C3lmPvdxZqd/H4po84NPzd5MrqgtL74= -go.opentelemetry.io/collector/pipeline/pipelineprofiles v0.116.0 h1:vRdnwIU40bYtxntVOmxg4Bhrh9QVKtx5wwlxK21rc1s= -go.opentelemetry.io/collector/pipeline/pipelineprofiles v0.116.0/go.mod h1:KxDMUOfbVy8lzZ85CZEG3gCJEYMyWiBKdN+HWUwQWTM= +go.opentelemetry.io/collector/pipeline/xpipeline v0.117.0 h1:jnHQNaNfVRIdrtOPCORUy8s1cEJyxql3uv/WQ1ve1Js= +go.opentelemetry.io/collector/pipeline/xpipeline v0.117.0/go.mod h1:lNY3uQjRcb3f7CW1JQMXJcWzCJp5122LOKrKs5eito8= go.opentelemetry.io/collector/processor v0.117.0 h1:K4WdaNC5ROIoLRGgyHmXxtw7xVpAMR4cIMQ5PVLP5cI= go.opentelemetry.io/collector/processor v0.117.0/go.mod h1:4ewsyJD4n8GjFN+mFbxgr7uXLZYNcJEnH3wl47aDV7s= go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.117.0 h1:JDFPL628wHZFVfB40WxwoRE0pQfCCO46/7zt+/9LLZM=