@@ -64,7 +64,7 @@ func podAddAndUpdateTest(t *testing.T, c *WatchClient, handler func(obj any)) {
6464 got := c .Pods [newPodIdentifier ("connection" , "k8s.pod.ip" , "1.1.1.1" )]
6565 assert .Equal (t , "1.1.1.1" , got .Address )
6666 assert .Equal (t , "podA" , got .Name )
67- assert .Equal ( t , "" , got .PodUID )
67+ assert .Empty ( t , got .PodUID )
6868
6969 pod = & api_v1.Pod {}
7070 pod .Name = "podB"
@@ -74,7 +74,7 @@ func podAddAndUpdateTest(t *testing.T, c *WatchClient, handler func(obj any)) {
7474 got = c .Pods [newPodIdentifier ("connection" , "k8s.pod.ip" , "1.1.1.1" )]
7575 assert .Equal (t , "1.1.1.1" , got .Address )
7676 assert .Equal (t , "podB" , got .Name )
77- assert .Equal ( t , "" , got .PodUID )
77+ assert .Empty ( t , got .PodUID )
7878
7979 pod = & api_v1.Pod {}
8080 pod .Name = "podC"
@@ -105,7 +105,7 @@ func namespaceAddAndUpdateTest(t *testing.T, c *WatchClient, handler func(obj an
105105 assert .Len (t , c .Namespaces , 1 )
106106 got := c .Namespaces ["namespaceA" ]
107107 assert .Equal (t , "namespaceA" , got .Name )
108- assert .Equal ( t , "" , got .NamespaceUID )
108+ assert .Empty ( t , got .NamespaceUID )
109109
110110 namespace = & api_v1.Namespace {}
111111 namespace .Name = "namespaceB"
@@ -131,7 +131,7 @@ func nodeAddAndUpdateTest(t *testing.T, c *WatchClient, handler func(obj any)) {
131131 got , ok := c .GetNode ("nodeA" )
132132 assert .True (t , ok )
133133 assert .Equal (t , "nodeA" , got .Name )
134- assert .Equal ( t , "" , got .NodeUID )
134+ assert .Empty ( t , got .NodeUID )
135135
136136 node = & api_v1.Node {}
137137 node .Name = "nodeB"
@@ -319,7 +319,7 @@ func TestPodCreate(t *testing.T) {
319319 c .handlePodAdd (pod )
320320 assert .Len (t , c .Pods , 1 )
321321 got := c .Pods [newPodIdentifier ("resource_attribute" , "k8s.pod.uid" , "11111111-2222-3333-4444-555555555555" )]
322- assert .Equal ( t , "" , got .Address )
322+ assert .Empty ( t , got .Address )
323323 assert .Equal (t , "podD" , got .Name )
324324 assert .Equal (t , "11111111-2222-3333-4444-555555555555" , got .PodUID )
325325
@@ -330,7 +330,7 @@ func TestPodCreate(t *testing.T) {
330330 c .handlePodUpdate (& api_v1.Pod {}, pod )
331331 assert .Len (t , c .Pods , 1 )
332332 got = c .Pods [newPodIdentifier ("resource_attribute" , "k8s.pod.uid" , "11111111-2222-3333-4444-555555555555" )]
333- assert .Equal ( t , "" , got .Address )
333+ assert .Empty ( t , got .Address )
334334 assert .Equal (t , "podD" , got .Name )
335335 assert .Equal (t , "11111111-2222-3333-4444-555555555555" , got .PodUID )
336336
@@ -976,7 +976,7 @@ func TestExtractionRules(t *testing.T) {
976976 p , ok := c .GetPod (newPodIdentifier ("connection" , "" , pod .Status .PodIP ))
977977 require .True (t , ok )
978978
979- assert .Equal (t , len ( tc . attributes ) , len (p . Attributes ))
979+ assert .Len (t , p . Attributes , len (tc . attributes ))
980980 for k , v := range tc .attributes {
981981 got , ok := p .Attributes [k ]
982982 assert .True (t , ok )
@@ -1132,7 +1132,7 @@ func TestReplicaSetExtractionRules(t *testing.T) {
11321132 p , ok := c .GetPod (newPodIdentifier ("connection" , "" , pod .Status .PodIP ))
11331133 require .True (t , ok )
11341134
1135- assert .Equal (t , len ( tc . attributes ) , len (p . Attributes ))
1135+ assert .Len (t , p . Attributes , len (tc . attributes ))
11361136 for k , v := range tc .attributes {
11371137 got , ok := p .Attributes [k ]
11381138 assert .True (t , ok )
@@ -1228,7 +1228,7 @@ func TestNamespaceExtractionRules(t *testing.T) {
12281228 p , ok := c .GetNamespace (namespace .Name )
12291229 require .True (t , ok )
12301230
1231- assert .Equal (t , len ( tc . attributes ) , len (p . Attributes ))
1231+ assert .Len (t , p . Attributes , len (tc . attributes ))
12321232 for k , v := range tc .attributes {
12331233 got , ok := p .Attributes [k ]
12341234 assert .True (t , ok )
@@ -1324,7 +1324,7 @@ func TestNodeExtractionRules(t *testing.T) {
13241324 n , ok := c .GetNode (node .Name )
13251325 require .True (t , ok )
13261326
1327- assert .Equal (t , len ( tc . attributes ) , len (n . Attributes ))
1327+ assert .Len (t , n . Attributes , len (tc . attributes ))
13281328 for k , v := range tc .attributes {
13291329 got , ok := n .Attributes [k ]
13301330 assert .True (t , ok )
0 commit comments