Require volumes_from a container to be explicit in V2 config.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
c3968a439f
commit
b76dc1e05e
11 changed files with 166 additions and 53 deletions
|
|
@ -81,7 +81,7 @@ class ProjectTest(DockerClientTestCase):
|
|||
)
|
||||
db = project.get_service('db')
|
||||
data = project.get_service('data')
|
||||
self.assertEqual(db.volumes_from, [VolumeFromSpec(data, 'rw')])
|
||||
self.assertEqual(db.volumes_from, [VolumeFromSpec(data, 'rw', 'service')])
|
||||
|
||||
def test_volumes_from_container(self):
|
||||
data_container = Container.create(
|
||||
|
|
|
|||
|
|
@ -224,8 +224,8 @@ class ServiceTest(DockerClientTestCase):
|
|||
host_service = self.create_service(
|
||||
'host',
|
||||
volumes_from=[
|
||||
VolumeFromSpec(volume_service, 'rw'),
|
||||
VolumeFromSpec(volume_container_2, 'rw')
|
||||
VolumeFromSpec(volume_service, 'rw', 'service'),
|
||||
VolumeFromSpec(volume_container_2, 'rw', 'container')
|
||||
]
|
||||
)
|
||||
host_container = host_service.create_container()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue