Make volume host paths relative to file, merge volumes when extending
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
4c582e4352
commit
37efdb1f8b
5 changed files with 80 additions and 12 deletions
|
|
@ -7,18 +7,19 @@ from .testcases import DockerClientTestCase
|
|||
|
||||
class ProjectTest(DockerClientTestCase):
|
||||
def test_volumes_from_service(self):
|
||||
service_dicts = config.from_dictionary({
|
||||
'data': {
|
||||
'image': 'busybox:latest',
|
||||
'volumes': ['/var/data'],
|
||||
},
|
||||
'db': {
|
||||
'image': 'busybox:latest',
|
||||
'volumes_from': ['data'],
|
||||
},
|
||||
}, working_dir='.')
|
||||
project = Project.from_dicts(
|
||||
name='composetest',
|
||||
service_dicts=config.from_dictionary({
|
||||
'data': {
|
||||
'image': 'busybox:latest',
|
||||
'volumes': ['/var/data'],
|
||||
},
|
||||
'db': {
|
||||
'image': 'busybox:latest',
|
||||
'volumes_from': ['data'],
|
||||
},
|
||||
}),
|
||||
service_dicts=service_dicts,
|
||||
client=self.client,
|
||||
)
|
||||
db = project.get_service('db')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue