@@ -62,16 +62,10 @@ func TestRemoveTerminatedContainerInfo(t *testing.T) {
62
62
// The latest containers, which should be in the results.
63
63
"/pod0-i" : getTestContainerInfo (seedPod0Infra , pName0 , namespace , leaky .PodInfraContainerName ),
64
64
"/pod0-c0" : getTestContainerInfo (seedPod0Container0 , pName0 , namespace , cName00 ),
65
-
66
- // Duplicated containers with non-zero CPU and memory usage. This case
67
- // shouldn't happen unless something goes wrong, but we want to test
68
- // that the metrics reporting logic works in this scenario.
69
- "/pod0-i-duplicated" : getTestContainerInfo (seedPod0Infra , pName0 , namespace , leaky .PodInfraContainerName ),
70
- "/pod0-c0-duplicated" : getTestContainerInfo (seedPod0Container0 , pName0 , namespace , cName00 ),
71
65
}
72
66
output := removeTerminatedContainerInfo (infos )
73
- assert .Len (t , output , 4 )
74
- for _ , c := range []string {"/pod0-i" , "/pod0-c0" , "/pod0-i-duplicated" , "/pod0-c0-duplicated" } {
67
+ assert .Len (t , output , 2 )
68
+ for _ , c := range []string {"/pod0-i" , "/pod0-c0" } {
75
69
if _ , found := output [c ]; ! found {
76
70
t .Errorf ("%q is expected to be in the output\n " , c )
77
71
}
0 commit comments