mirror of https://github.com/docker/docker-py.git
Move volume_driver to RUN_HOST_CONFIG_KWARGS
Fixes #2271 Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se>
This commit is contained in:
parent
142db4b3d3
commit
523371e21d
|
@ -964,7 +964,6 @@ RUN_CREATE_KWARGS = [
|
||||||
'tty',
|
'tty',
|
||||||
'use_config_proxy',
|
'use_config_proxy',
|
||||||
'user',
|
'user',
|
||||||
'volume_driver',
|
|
||||||
'working_dir',
|
'working_dir',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1028,6 +1027,7 @@ RUN_HOST_CONFIG_KWARGS = [
|
||||||
'userns_mode',
|
'userns_mode',
|
||||||
'uts_mode',
|
'uts_mode',
|
||||||
'version',
|
'version',
|
||||||
|
'volume_driver',
|
||||||
'volumes_from',
|
'volumes_from',
|
||||||
'runtime'
|
'runtime'
|
||||||
]
|
]
|
||||||
|
|
|
@ -378,3 +378,13 @@ class ContainerTest(BaseIntegrationTest):
|
||||||
detach=True)
|
detach=True)
|
||||||
self.tmp_containers.append(container.id)
|
self.tmp_containers.append(container.id)
|
||||||
assert container.wait()['StatusCode'] == 1
|
assert container.wait()['StatusCode'] == 1
|
||||||
|
|
||||||
|
def test_create_with_volume_driver(self):
|
||||||
|
client = docker.from_env(version=TEST_API_VERSION)
|
||||||
|
container = client.containers.create(
|
||||||
|
'alpine',
|
||||||
|
'sleep 300',
|
||||||
|
volume_driver='foo'
|
||||||
|
)
|
||||||
|
self.tmp_containers.append(container.id)
|
||||||
|
assert container.attrs['HostConfig']['VolumeDriver'] == 'foo'
|
||||||
|
|
|
@ -176,6 +176,7 @@ class ContainerCollectionTest(unittest.TestCase):
|
||||||
'Ulimits': [{"Name": "nofile", "Soft": 1024, "Hard": 2048}],
|
'Ulimits': [{"Name": "nofile", "Soft": 1024, "Hard": 2048}],
|
||||||
'UsernsMode': 'host',
|
'UsernsMode': 'host',
|
||||||
'UTSMode': 'host',
|
'UTSMode': 'host',
|
||||||
|
'VolumeDriver': 'some_driver',
|
||||||
'VolumesFrom': ['container'],
|
'VolumesFrom': ['container'],
|
||||||
},
|
},
|
||||||
healthcheck={'test': 'true'},
|
healthcheck={'test': 'true'},
|
||||||
|
@ -190,7 +191,6 @@ class ContainerCollectionTest(unittest.TestCase):
|
||||||
stop_signal=9,
|
stop_signal=9,
|
||||||
tty=True,
|
tty=True,
|
||||||
user='bob',
|
user='bob',
|
||||||
volume_driver='some_driver',
|
|
||||||
volumes=[
|
volumes=[
|
||||||
'/mnt/vol2',
|
'/mnt/vol2',
|
||||||
'/mnt/vol1',
|
'/mnt/vol1',
|
||||||
|
|
Loading…
Reference in New Issue