summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoffrey F <joffrey@docker.com>2016-10-13 16:45:01 -0700
committerJoffrey F <joffrey@docker.com>2016-10-14 16:02:28 -0700
commit9b35c74f0e7626e360dfa2f00202d23b8d08b7a5 (patch)
tree8218fc7c87f74c8e1361a5ed06fd88518b957002
parentcec3fe7c318fd22386ff5b18519609ab72db696b (diff)
downloaddocker-py-win32-test-fixes.tar.gz
Fix dockerignore exclusion logic on Windowswin32-test-fixes
Signed-off-by: Joffrey F <joffrey@docker.com>
-rw-r--r--docker/utils/utils.py4
-rw-r--r--tests/integration/container_test.py6
2 files changed, 8 insertions, 2 deletions
diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index f2f7c26..d89aecf 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -209,8 +209,8 @@ def match_path(path, pattern):
if pattern:
pattern = os.path.relpath(pattern)
- pattern_components = pattern.split('/')
- path_components = path.split('/')[:len(pattern_components)]
+ pattern_components = pattern.split(os.path.sep)
+ path_components = path.split(os.path.sep)[:len(pattern_components)]
return fnmatch('/'.join(path_components), pattern)
diff --git a/tests/integration/container_test.py b/tests/integration/container_test.py
index 5ced082..838ec36 100644
--- a/tests/integration/container_test.py
+++ b/tests/integration/container_test.py
@@ -414,6 +414,9 @@ class VolumeBindTest(BaseIntegrationTest):
['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(
@@ -429,6 +432,9 @@ class VolumeBindTest(BaseIntegrationTest):
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,