@@ -721,7 +721,7 @@ func TestStore_MultiPID_SameContainerAndNamespace(t *testing.T) {
721
721
setupPIDs : []uint32 {2001 , 2002 , 2003 , 2004 },
722
722
containerID : "container456" ,
723
723
pidNS : 6000 ,
724
- operations : func (t * testing.T , store * Store , pids []uint32 ) {
724
+ operations : func (t * testing.T , store * Store , _ []uint32 ) {
725
725
// Delete middle PID
726
726
store .DeleteProcess (2002 )
727
727
@@ -775,13 +775,13 @@ func TestStore_MultiPID_SameContainerAndNamespace(t *testing.T) {
775
775
// Verify namespace map is empty or doesn't exist
776
776
nsMap , exists := store .namespaces [7000 ]
777
777
if exists {
778
- assert .Len (t , nsMap , 0 , "Namespace map should be empty" )
778
+ assert .Empty (t , nsMap , "Namespace map should be empty" )
779
779
}
780
780
781
781
// Verify container map is empty or doesn't exist
782
782
cidMap , exists := store .containerIDs ["container789" ]
783
783
if exists {
784
- assert .Len (t , cidMap , 0 , "Container map should be empty" )
784
+ assert .Empty (t , cidMap , "Container map should be empty" )
785
785
}
786
786
787
787
// Verify containerByPID has no entries for these PIDs
@@ -797,7 +797,7 @@ func TestStore_MultiPID_SameContainerAndNamespace(t *testing.T) {
797
797
setupPIDs : []uint32 {}, // Start empty
798
798
containerID : "container999" ,
799
799
pidNS : 8000 ,
800
- operations : func (t * testing.T , store * Store , pids []uint32 ) {
800
+ operations : func (t * testing.T , store * Store , _ []uint32 ) {
801
801
// Add PIDs one by one
802
802
testPIDs := []uint32 {4001 , 4002 , 4003 , 4004 , 4005 }
803
803
@@ -833,7 +833,7 @@ func TestStore_MultiPID_SameContainerAndNamespace(t *testing.T) {
833
833
setupPIDs : []uint32 {5001 , 5002 },
834
834
containerID : "container111" ,
835
835
pidNS : 9000 ,
836
- operations : func (t * testing.T , store * Store , pids []uint32 ) {
836
+ operations : func (t * testing.T , store * Store , _ []uint32 ) {
837
837
// Initial state: 2 PIDs
838
838
store .access .RLock ()
839
839
nsMap , exists := store .namespaces [9000 ]
@@ -1018,13 +1018,13 @@ func TestStore_MultiPID_CrossContainerScenarios(t *testing.T) {
1018
1018
// Namespace 2000 should be empty or non-existent
1019
1019
nsMap2000 , exists := store .namespaces [2000 ]
1020
1020
if exists {
1021
- assert .Len (t , nsMap2000 , 0 , "Namespace 2000 should be empty" )
1021
+ assert .Empty (t , nsMap2000 , "Namespace 2000 should be empty" )
1022
1022
}
1023
1023
1024
1024
// Container2 map should be empty or non-existent
1025
1025
cont2Map , exists := store .containerIDs ["cont2" ]
1026
1026
if exists {
1027
- assert .Len (t , cont2Map , 0 , "Container2 map should be empty" )
1027
+ assert .Empty (t , cont2Map , "Container2 map should be empty" )
1028
1028
}
1029
1029
1030
1030
// Other containers should be unaffected
@@ -1124,7 +1124,7 @@ func TestStore_MultiPID_ConcurrentAccess(t *testing.T) {
1124
1124
containerID := "concurrent-container"
1125
1125
pidNS := uint32 (9999 )
1126
1126
1127
- InfoForPID = func (pid uint32 ) (container.Info , error ) {
1127
+ InfoForPID = func (uint32 ) (container.Info , error ) {
1128
1128
return container.Info {
1129
1129
ContainerID : containerID ,
1130
1130
PIDNamespace : pidNS ,
@@ -1175,7 +1175,7 @@ func TestStore_MultiPID_ConcurrentAccess(t *testing.T) {
1175
1175
cidMap , cidExists := store .containerIDs [containerID ]
1176
1176
assert .Equal (t , cidExists , exists , "Both maps should have same existence state" )
1177
1177
if cidExists {
1178
- assert .Equal (t , len ( nsMap ) , len (cidMap ), "Both maps should have same number of PIDs" )
1178
+ assert .Len (t , nsMap , len (cidMap ), "Both maps should have same number of PIDs" )
1179
1179
1180
1180
// Verify consistency between maps
1181
1181
for pid , nsInfo := range nsMap {
0 commit comments