diff --git a/receiver/receivercreator/fixtures_test.go b/receiver/receivercreator/fixtures_test.go index 964ce437bf9e..e8f086b5e2fc 100644 --- a/receiver/receivercreator/fixtures_test.go +++ b/receiver/receivercreator/fixtures_test.go @@ -82,7 +82,8 @@ var podContainerEndpointWithHints = observer.Endpoint{ ID: "namespace/pod-2-UID/redis(6379)", Target: "1.2.3.4:6379", Details: &observer.PodContainer{ - Name: "redis", Pod: observer.Pod{ + Image: "redis", + Name: "redis", Pod: observer.Pod{ Name: "pod-2", Namespace: "default", UID: "pod-2-UID", diff --git a/receiver/receivercreator/rules_test.go b/receiver/receivercreator/rules_test.go index 4ecd0c8f85f8..315b1f39da52 100644 --- a/receiver/receivercreator/rules_test.go +++ b/receiver/receivercreator/rules_test.go @@ -33,6 +33,7 @@ func Test_ruleEval(t *testing.T) { {"basic container", args{`type == "container" && labels["region"] == "east-1"`, containerEndpoint}, true, false}, {"basic k8s.node", args{`type == "k8s.node" && kubelet_endpoint_port == 10250`, k8sNodeEndpoint}, true, false}, {"relocated type builtin", args{`type == "k8s.node" && typeOf("some string") == "string"`, k8sNodeEndpoint}, true, false}, + {"pod container", args{`type == "pod.container" and container_image matches "redis"`, podContainerEndpointWithHints}, true, false}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) {