@@ -570,7 +570,10 @@ def test_create_with_mounts(self):
570570 mount = docker .types .Mount (
571571 type = "bind" , source = self .mount_origin , target = self .mount_dest
572572 )
573- host_config = self .client .create_host_config (mounts = [mount ])
573+ host_config = self .client .create_host_config (
574+ mounts = [mount ],
575+ security_opt = ["label=disable" ],
576+ )
574577 container = self .run_container (
575578 TEST_IMG , ['ls' , self .mount_dest ],
576579 host_config = host_config
@@ -587,7 +590,10 @@ def test_create_with_mounts_ro(self):
587590 type = "bind" , source = self .mount_origin , target = self .mount_dest ,
588591 read_only = True
589592 )
590- host_config = self .client .create_host_config (mounts = [mount ])
593+ host_config = self .client .create_host_config (
594+ mounts = [mount ],
595+ security_opt = ["label=disable" ],
596+ )
591597 container = self .run_container (
592598 TEST_IMG , ['ls' , self .mount_dest ],
593599 host_config = host_config
@@ -604,7 +610,10 @@ def test_create_with_volume_mount(self):
604610 type = "volume" , source = helpers .random_name (),
605611 target = self .mount_dest , labels = {'com.dockerpy.test' : 'true' }
606612 )
607- host_config = self .client .create_host_config (mounts = [mount ])
613+ host_config = self .client .create_host_config (
614+ mounts = [mount ],
615+ security_opt = ["label=disable" ],
616+ )
608617 container = self .client .create_container (
609618 TEST_IMG , ['true' ], host_config = host_config ,
610619 )
@@ -693,7 +702,8 @@ def run_with_volume(self, ro, *args, **kwargs):
693702 'ro' : ro ,
694703 },
695704 },
696- network_mode = 'none'
705+ network_mode = 'none' ,
706+ security_opt = ["label=disable" ],
697707 ),
698708 ** kwargs
699709 )
@@ -710,7 +720,8 @@ def run_with_volume_propagation(self, ro, propagation, *args, **kwargs):
710720 'propagation' : propagation
711721 },
712722 },
713- network_mode = 'none'
723+ network_mode = 'none' ,
724+ security_opt = ["label=disable" ],
714725 ),
715726 ** kwargs
716727 )
0 commit comments