@@ -198,14 +198,26 @@ func TestBasicSetupAndRemove(t *testing.T) {
198198
199199 // Setup network
200200 result , err := l .Setup (ctx , id , nsPath )
201- assert .NoError (t , err , "[%v] setup network for namespace %v" , idx , nsPath )
201+ assert .NoError (t , err , "[%v] setup network interfaces for namespace in parallel %v" , idx , nsPath )
202202
203203 ip := result .Interfaces [defaultIfName ].IPConfigs [0 ].IP .String ()
204204 t .Logf ("[%v] ip is %v" , idx , ip )
205205
206206 assert .NoError (t ,
207207 l .Remove (ctx , id , nsPath ),
208- "[%v] teardown network for namespace %v" , idx , nsPath ,
208+ "[%v] teardown network interfaces for namespace %v" , idx , nsPath ,
209+ )
210+
211+ // Setup network serially
212+ result , err = l .SetupSerially (ctx , id , nsPath )
213+ assert .NoError (t , err , "[%v] setup network interfaces for namespace serially%v" , idx , nsPath )
214+
215+ ip = result .Interfaces [defaultIfName ].IPConfigs [0 ].IP .String ()
216+ t .Logf ("[%v] ip is %v" , idx , ip )
217+
218+ assert .NoError (t ,
219+ l .Remove (ctx , id , nsPath ),
220+ "[%v] teardown network interfaces for namespace %v" , idx , nsPath ,
209221 )
210222 }
211223}
@@ -271,14 +283,26 @@ func TestBasicSetupAndRemovePluginWithoutVersion(t *testing.T) {
271283
272284 // Setup network
273285 result , err := l .Setup (ctx , id , nsPath )
274- assert .NoError (t , err , "[%v] setup network for namespace %v" , idx , nsPath )
286+ assert .NoError (t , err , "[%v] setup network interfaces for namespace in parallel %v" , idx , nsPath )
275287
276288 ip := result .Interfaces [defaultIfName ].IPConfigs [0 ].IP .String ()
277289 t .Logf ("[%v] ip is %v" , idx , ip )
278290
279291 assert .NoError (t ,
280292 l .Remove (ctx , id , nsPath ),
281- "[%v] teardown network for namespace %v" , idx , nsPath ,
293+ "[%v] teardown network interfaces for namespace %v" , idx , nsPath ,
294+ )
295+
296+ // Setup network serially
297+ result , err = l .SetupSerially (ctx , id , nsPath )
298+ assert .NoError (t , err , "[%v] setup network interfaces for namespace serially%v" , idx , nsPath )
299+
300+ ip = result .Interfaces [defaultIfName ].IPConfigs [0 ].IP .String ()
301+ t .Logf ("[%v] ip is %v" , idx , ip )
302+
303+ assert .NoError (t ,
304+ l .Remove (ctx , id , nsPath ),
305+ "[%v] teardown network interfaces for namespace %v" , idx , nsPath ,
282306 )
283307 }
284308}
0 commit comments