Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions tests/integration/api_container_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,10 @@ def test_create_with_mounts(self):
mount = docker.types.Mount(
type="bind", source=self.mount_origin, target=self.mount_dest
)
host_config = self.client.create_host_config(mounts=[mount])
host_config = self.client.create_host_config(
mounts=[mount],
security_opt=["label=disable"],
)
container = self.run_container(
TEST_IMG, ['ls', self.mount_dest],
host_config=host_config
Expand All @@ -587,7 +590,10 @@ def test_create_with_mounts_ro(self):
type="bind", source=self.mount_origin, target=self.mount_dest,
read_only=True
)
host_config = self.client.create_host_config(mounts=[mount])
host_config = self.client.create_host_config(
mounts=[mount],
security_opt=["label=disable"],
)
container = self.run_container(
TEST_IMG, ['ls', self.mount_dest],
host_config=host_config
Expand All @@ -604,7 +610,10 @@ def test_create_with_volume_mount(self):
type="volume", source=helpers.random_name(),
target=self.mount_dest, labels={'com.dockerpy.test': 'true'}
)
host_config = self.client.create_host_config(mounts=[mount])
host_config = self.client.create_host_config(
mounts=[mount],
security_opt=["label=disable"],
)
container = self.client.create_container(
TEST_IMG, ['true'], host_config=host_config,
)
Expand Down Expand Up @@ -693,7 +702,8 @@ def run_with_volume(self, ro, *args, **kwargs):
'ro': ro,
},
},
network_mode='none'
network_mode='none',
security_opt=["label=disable"],
),
**kwargs
)
Expand All @@ -710,7 +720,8 @@ def run_with_volume_propagation(self, ro, propagation, *args, **kwargs):
'propagation': propagation
},
},
network_mode='none'
network_mode='none',
security_opt=["label=disable"],
),
**kwargs
)
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/models_containers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_run_with_volume(self):

container = client.containers.run(
"alpine", "sh -c 'echo \"hello\" > /insidecontainer/test'",
volumes=[f"{path}:/insidecontainer"],
volumes=[f"{path}:/insidecontainer:z"],
detach=True
)
self.tmp_containers.append(container.id)
Expand All @@ -57,7 +57,7 @@ def test_run_with_volume(self):
name = "container_volume_test"
out = client.containers.run(
"alpine", "cat /insidecontainer/test",
volumes=[f"{path}:/insidecontainer"],
volumes=[f"{path}:/insidecontainer:z"],
name=name
)
self.tmp_containers.append(name)
Expand Down