Merge build.args when merging services.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2016-02-10 13:54:40 -05:00
commit 155efd28fa
2 changed files with 45 additions and 17 deletions

View file

@ -1079,6 +1079,39 @@ class ConfigTest(unittest.TestCase):
'extends': {'service': 'foo'}
}
def test_merge_build_args(self):
base = {
'build': {
'context': '.',
'args': {
'ONE': '1',
'TWO': '2',
},
}
}
override = {
'build': {
'args': {
'TWO': 'dos',
'THREE': '3',
},
}
}
actual = config.merge_service_dicts(
base,
override,
DEFAULT_VERSION)
assert actual == {
'build': {
'context': '.',
'args': {
'ONE': '1',
'TWO': 'dos',
'THREE': '3',
},
}
}
def test_external_volume_config(self):
config_details = build_config_details({
'version': '2',