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
|
|
@ -133,7 +133,6 @@ class EnvTest(unittest.TestCase):
|
|||
{'FILE_DEF': 'F1', 'FILE_DEF_EMPTY': '', 'ENV_DEF': 'E3', 'NO_DEF': ''},
|
||||
)
|
||||
|
||||
|
||||
class ExtendsTest(unittest.TestCase):
|
||||
def test_extends(self):
|
||||
service_dicts = config.load('tests/fixtures/extends/docker-compose.yml')
|
||||
|
|
@ -241,3 +240,13 @@ class ExtendsTest(unittest.TestCase):
|
|||
|
||||
with mock.patch.object(config, 'load_yaml', return_value=other_config):
|
||||
print load_config()
|
||||
|
||||
def test_volume_path(self):
|
||||
dicts = config.load('tests/fixtures/volume-path/docker-compose.yml')
|
||||
|
||||
paths = [
|
||||
'%s:/foo' % os.path.abspath('tests/fixtures/volume-path/common/foo'),
|
||||
'%s:/bar' % os.path.abspath('tests/fixtures/volume-path/bar'),
|
||||
]
|
||||
|
||||
self.assertEqual(set(dicts[0]['volumes']), set(paths))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue