diff --git a/receiver/k8sclusterreceiver/internal/pod/testdata/expected.yaml b/receiver/k8sclusterreceiver/internal/pod/testdata/expected.yaml index 50fdcb9bde22..abe586c4d395 100644 --- a/receiver/k8sclusterreceiver/internal/pod/testdata/expected.yaml +++ b/receiver/k8sclusterreceiver/internal/pod/testdata/expected.yaml @@ -32,7 +32,7 @@ resourceMetrics: stringValue: container-id - key: container.image.name value: - stringValue: container-image-name + stringValue: docker.io/otel/test-image - key: container.image.tag value: stringValue: latest diff --git a/receiver/k8sclusterreceiver/internal/testutils/objects.go b/receiver/k8sclusterreceiver/internal/testutils/objects.go index 4b8dddd6bc45..ac1092a2a988 100644 --- a/receiver/k8sclusterreceiver/internal/testutils/objects.go +++ b/receiver/k8sclusterreceiver/internal/testutils/objects.go @@ -232,7 +232,7 @@ func NewPodSpecWithContainer(containerName string) *corev1.PodSpec { Containers: []corev1.Container{ { Name: containerName, - Image: "container-image-name", + Image: "docker.io/otel/test-image@sha256:22eeed9e66facc651d4344ef7d9ce912fccff5bb3969e745eed3ab953f309534", Resources: corev1.ResourceRequirements{ Limits: corev1.ResourceList{ corev1.ResourceCPU: *resource.NewQuantity(20, resource.DecimalSI), @@ -254,7 +254,7 @@ func NewPodStatusWithContainer(containerName, containerID string) *corev1.PodSta Name: containerName, Ready: true, RestartCount: 3, - Image: "container-image-name", + Image: "docker.io/otel/test-image@sha256:22eeed9e66facc651d4344ef7d9ce912fccff5bb3969e745eed3ab953f309534", ContainerID: containerID, State: corev1.ContainerState{ Running: &corev1.ContainerStateRunning{}, @@ -288,6 +288,7 @@ func NewEvictedTerminatedPodStatusWithContainer(containerName, containerID strin }, } } + func WithOwnerReferences(or []v1.OwnerReference, obj any) any { switch o := obj.(type) { case *corev1.Pod: