summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoffrey F <joffrey@docker.com>2017-05-09 16:16:10 -0700
committerJoffrey F <joffrey@docker.com>2017-05-09 16:16:10 -0700
commitbf60e2a330f964c43cc379ead6c209adaa4c74f4 (patch)
treecb7aa45c93aa15572976546d18a4d69d2f8c3e61
parent4e217b5cc48a89e32bf6fa9fe0217c0f6421134c (diff)
downloaddocker-py-init_path_removed.tar.gz
init_path removed in Engine 17.05init_path_removed
Signed-off-by: Joffrey F <joffrey@docker.com>
-rw-r--r--docker/types/containers.py4
-rw-r--r--tests/integration/api_container_test.py1
2 files changed, 5 insertions, 0 deletions
diff --git a/docker/types/containers.py b/docker/types/containers.py
index 06d0ee4..18d1838 100644
--- a/docker/types/containers.py
+++ b/docker/types/containers.py
@@ -438,6 +438,10 @@ class HostConfig(dict):
if init_path is not None:
if version_lt(version, '1.25'):
raise host_config_version_error('init_path', '1.25')
+
+ if version_gte(version, '1.29'):
+ # https://github.com/moby/moby/pull/32470
+ raise host_config_version_error('init_path', '1.29', False)
self['InitPath'] = init_path
if volume_driver is not None:
diff --git a/tests/integration/api_container_test.py b/tests/integration/api_container_test.py
index 9514261..fb4c4e4 100644
--- a/tests/integration/api_container_test.py
+++ b/tests/integration/api_container_test.py
@@ -451,6 +451,7 @@ class CreateContainerTest(BaseAPIIntegrationTest):
config = self.client.inspect_container(ctnr)
assert config['HostConfig']['Init'] is True
+ @pytest.mark.xfail(True, reason='init-path removed in 17.05.0')
@requires_api_version('1.25')
def test_create_with_init_path(self):
ctnr = self.client.create_container(