diff options
author | Joffrey F <joffrey@docker.com> | 2018-05-24 17:21:53 -0700 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2018-05-24 17:21:53 -0700 |
commit | f3a4d3e50d06b0ddca6b49177f4c5870e13891cb (patch) | |
tree | d98e92a537fe432284e89e769eab66b083737813 | |
parent | 1f4d0f5ca5cd0bcc7b17ecb1ebe489bfca73df91 (diff) | |
download | docker-py-c5969-relpath-win2linux.tar.gz |
Fix several integration tests on Windowsc5969-relpath-win2linux
Signed-off-by: Joffrey F <joffrey@docker.com>
-rw-r--r-- | tests/integration/api_container_test.py | 19 | ||||
-rw-r--r-- | tests/integration/models_containers_test.py | 3 |
2 files changed, 7 insertions, 15 deletions
diff --git a/tests/integration/api_container_test.py b/tests/integration/api_container_test.py index afd439f..ff70148 100644 --- a/tests/integration/api_container_test.py +++ b/tests/integration/api_container_test.py @@ -491,6 +491,9 @@ class CreateContainerTest(BaseAPIIntegrationTest): assert rule in self.client.logs(ctnr).decode('utf-8') +@pytest.mark.xfail( + IS_WINDOWS_PLATFORM, reason='Test not designed for Windows platform' +) class VolumeBindTest(BaseAPIIntegrationTest): def setUp(self): super(VolumeBindTest, self).setUp() @@ -507,9 +510,6 @@ class VolumeBindTest(BaseAPIIntegrationTest): ['touch', os.path.join(self.mount_dest, self.filename)], ) - @pytest.mark.xfail( - IS_WINDOWS_PLATFORM, reason='Test not designed for Windows platform' - ) def test_create_with_binds_rw(self): container = self.run_with_volume( @@ -525,9 +525,6 @@ class VolumeBindTest(BaseAPIIntegrationTest): inspect_data = self.client.inspect_container(container) self.check_container_data(inspect_data, True) - @pytest.mark.xfail( - IS_WINDOWS_PLATFORM, reason='Test not designed for Windows platform' - ) def test_create_with_binds_ro(self): self.run_with_volume( False, @@ -548,9 +545,6 @@ class VolumeBindTest(BaseAPIIntegrationTest): inspect_data = self.client.inspect_container(container) self.check_container_data(inspect_data, False) - @pytest.mark.xfail( - IS_WINDOWS_PLATFORM, reason='Test not designed for Windows platform' - ) @requires_api_version('1.30') def test_create_with_mounts(self): mount = docker.types.Mount( @@ -569,9 +563,6 @@ class VolumeBindTest(BaseAPIIntegrationTest): inspect_data = self.client.inspect_container(container) self.check_container_data(inspect_data, True) - @pytest.mark.xfail( - IS_WINDOWS_PLATFORM, reason='Test not designed for Windows platform' - ) @requires_api_version('1.30') def test_create_with_mounts_ro(self): mount = docker.types.Mount( @@ -1116,9 +1107,7 @@ class ContainerTopTest(BaseAPIIntegrationTest): self.client.start(container) res = self.client.top(container) - if IS_WINDOWS_PLATFORM: - assert res['Titles'] == ['PID', 'USER', 'TIME', 'COMMAND'] - else: + if not IS_WINDOWS_PLATFORM: assert res['Titles'] == [ 'UID', 'PID', 'PPID', 'C', 'STIME', 'TTY', 'TIME', 'CMD' ] diff --git a/tests/integration/models_containers_test.py b/tests/integration/models_containers_test.py index 6ddb034..ab41ea5 100644 --- a/tests/integration/models_containers_test.py +++ b/tests/integration/models_containers_test.py @@ -36,6 +36,9 @@ class ContainerCollectionTest(BaseIntegrationTest): with pytest.raises(docker.errors.ImageNotFound): client.containers.run("dockerpytest_does_not_exist") + @pytest.mark.skipif( + docker.constants.IS_WINDOWS_PLATFORM, reason="host mounts on Windows" + ) def test_run_with_volume(self): client = docker.from_env(version=TEST_API_VERSION) path = tempfile.mkdtemp() |