@@ -91,6 +91,7 @@ def test_basic(self):
9191 'kernel.msgmax' , 'value' , '4096' ])
9292 self .cli_set (base_path + ['name' , cont_name , 'log-driver' , 'journald' ])
9393 self .cli_set (base_path + ['name' , cont_name , 'allow-host-cgroups' ])
94+ self .cli_set (base_path + ['name' , cont_name , 'stop-timeout' , '1' ])
9495 # commit changes
9596 self .cli_commit ()
9697
@@ -115,6 +116,7 @@ def test_healthcheck(self):
115116
116117 self .cli_set (base_path + ['name' , cont_name , 'allow-host-networks' ])
117118 self .cli_set (base_path + ['name' , cont_name , 'image' , busybox_image ])
119+ self .cli_set (base_path + ['name' , cont_name , 'stop-timeout' , '1' ])
118120
119121 self .cli_set (base_path + ['name' , cont_name , 'health-check' , 'command' , 'true' ])
120122 self .cli_set (base_path + ['name' , cont_name , 'health-check' , 'interval' , '10' ])
@@ -138,6 +140,7 @@ def test_name_server(self):
138140 self .cli_set (base_path + ['network' , net_name , 'prefix' , prefix ])
139141
140142 self .cli_set (base_path + ['name' , cont_name , 'image' , busybox_image ])
143+ self .cli_set (base_path + ['name' , cont_name , 'stop-timeout' , '1' ])
141144 for name_server in name_servers :
142145 self .cli_set (base_path + ['name' , cont_name , 'name-server' , name_server ])
143146 self .cli_set (
@@ -171,6 +174,7 @@ def test_cpu_limit(self):
171174 self .cli_set (base_path + ['name' , cont_name , 'allow-host-networks' ])
172175 self .cli_set (base_path + ['name' , cont_name , 'image' , busybox_image ])
173176 self .cli_set (base_path + ['name' , cont_name , 'cpu-quota' , '1.25' ])
177+ self .cli_set (base_path + ['name' , cont_name , 'stop-timeout' , '1' ])
174178
175179 self .cli_commit ()
176180
@@ -250,10 +254,12 @@ def test_user_defined_mac(self):
250254 self .cli_set (base_path + ['name' , "test1" , 'image' , busybox_image ])
251255 self .cli_set (base_path + ['name' , "test1" , 'network' , 'bridge1' , 'address' , '10.0.1.11' ])
252256 self .cli_set (base_path + ['name' , "test1" , 'network' , 'bridge1' , 'mac' , '02:00:00:00:00:01' ])
257+ self .cli_set (base_path + ['name' , "test1" , 'stop-timeout' , '1' ])
253258
254259 self .cli_set (base_path + ['name' , "test2" , 'image' , busybox_image ])
255260 self .cli_set (base_path + ['name' , "test2" , 'network' , 'bridge1' , 'address' , '10.0.1.12' ])
256261 self .cli_set (base_path + ['name' , "test2" , 'network' , 'bridge1' , 'mac' , '02:00:00:00:00:02' ])
262+ self .cli_set (base_path + ['name' , "test2" , 'stop-timeout' , '1' ])
257263 self .cli_commit ()
258264
259265 n = cmd_to_json (['container' , 'inspect' , 'test1' ])
@@ -275,8 +281,10 @@ def test_long_name_host_interface_uniqueness(self):
275281 self .cli_set (base_path + ['network' , net_name , 'prefix' , prefix ])
276282 self .cli_set (base_path + ['name' , name_1 , 'image' , busybox_image ])
277283 self .cli_set (base_path + ['name' , name_1 , 'network' , net_name , 'address' , str (ip_interface (prefix ).ip + 2 )])
284+ self .cli_set (base_path + ['name' , name_1 , 'stop-timeout' , '1' ])
278285 self .cli_set (base_path + ['name' , name_2 , 'image' , busybox_image ])
279286 self .cli_set (base_path + ['name' , name_2 , 'network' , net_name , 'address' , str (ip_interface (prefix ).ip + 3 )])
287+ self .cli_set (base_path + ['name' , name_2 , 'stop-timeout' , '1' ])
280288 self .cli_commit ()
281289
282290 # Both containers run a "conmon" process at once, so checking by
@@ -301,8 +309,10 @@ def test_colliding_host_interface_names(self):
301309 self .cli_set (base_path + ['network' , net_name , 'prefix' , prefix ])
302310 self .cli_set (base_path + ['name' , name_1 , 'image' , busybox_image ])
303311 self .cli_set (base_path + ['name' , name_1 , 'network' , net_name , 'address' , str (ip_interface (prefix ).ip + 2 )])
312+ self .cli_set (base_path + ['name' , name_1 , 'stop-timeout' , '1' ])
304313 self .cli_set (base_path + ['name' , name_2 , 'image' , busybox_image ])
305314 self .cli_set (base_path + ['name' , name_2 , 'network' , net_name , 'address' , str (ip_interface (prefix ).ip + 3 )])
315+ self .cli_set (base_path + ['name' , name_2 , 'stop-timeout' , '1' ])
306316
307317 with self .assertRaises (ConfigSessionError ):
308318 self .cli_commit ()
@@ -320,6 +330,7 @@ def test_ipv4_network(self):
320330 for ii in range (1 , 6 ):
321331 name = f'{ base_name } -{ ii } '
322332 self .cli_set (base_path + ['name' , name , 'image' , busybox_image ])
333+ self .cli_set (base_path + ['name' , name , 'stop-timeout' , '1' ])
323334 self .cli_set (
324335 base_path
325336 + [
@@ -366,6 +377,7 @@ def test_ipv6_network(self):
366377 for ii in range (1 , 6 ):
367378 name = f'{ base_name } -{ ii } '
368379 self .cli_set (base_path + ['name' , name , 'image' , busybox_image ])
380+ self .cli_set (base_path + ['name' , name , 'stop-timeout' , '1' ])
369381 self .cli_set (
370382 base_path
371383 + [
@@ -414,6 +426,7 @@ def test_dual_stack_network(self):
414426 for ii in range (1 , 6 ):
415427 name = f'{ base_name } -{ ii } '
416428 self .cli_set (base_path + ['name' , name , 'image' , busybox_image ])
429+ self .cli_set (base_path + ['name' , name , 'stop-timeout' , '1' ])
417430 self .cli_set (
418431 base_path
419432 + [
@@ -480,6 +493,7 @@ def test_no_name_server(self):
480493
481494 name = f'{ base_name } -2'
482495 self .cli_set (base_path + ['name' , name , 'image' , busybox_image ])
496+ self .cli_set (base_path + ['name' , name , 'stop-timeout' , '1' ])
483497 self .cli_set (
484498 base_path
485499 + [
@@ -506,6 +520,7 @@ def test_network_mtu(self):
506520
507521 name = f'{ base_name } -2'
508522 self .cli_set (base_path + ['name' , name , 'image' , busybox_image ])
523+ self .cli_set (base_path + ['name' , name , 'stop-timeout' , '1' ])
509524 self .cli_set (
510525 base_path
511526 + [
@@ -530,6 +545,7 @@ def test_uid_gid(self):
530545 self .cli_set (base_path + ['name' , cont_name , 'allow-host-networks' ])
531546 self .cli_set (base_path + ['name' , cont_name , 'image' , busybox_image ])
532547 self .cli_set (base_path + ['name' , cont_name , 'gid' , gid ])
548+ self .cli_set (base_path + ['name' , cont_name , 'stop-timeout' , '1' ])
533549
534550 # verify() - GID can only be set if UID is set
535551 with self .assertRaises (ConfigSessionError ):
@@ -552,6 +568,7 @@ def test_api_socket(self):
552568 name = f'{ base_name } -{ ii } '
553569 self .cli_set (base_path + ['name' , name , 'image' , busybox_image ])
554570 self .cli_set (base_path + ['name' , name , 'allow-host-networks' ])
571+ self .cli_set (base_path + ['name' , name , 'stop-timeout' , '1' ])
555572
556573 self .cli_commit ()
557574
@@ -577,6 +594,7 @@ def test_network_vrf(self):
577594
578595 self .cli_set (base_path + ['name' , cont_name , 'image' , busybox_image ])
579596 self .cli_set (base_path + ['name' , cont_name , 'network' , net_name ])
597+ self .cli_set (base_path + ['name' , cont_name , 'stop-timeout' , '1' ])
580598 self .cli_set (base_path + ['network' , net_name , 'prefix' , '192.168.0.0/24' ])
581599 self .cli_set (base_path + ['network' , net_name , 'vrf' , vrf_name ])
582600
0 commit comments