Merge pull request #3052 from dnephin/merge_v1_logging

Fix merging of logging options in v1 config
This commit is contained in:
Aanand Prasad 2016-03-02 15:03:36 -08:00
commit 3f98c0716e
2 changed files with 20 additions and 0 deletions

View File

@ -88,6 +88,8 @@ ALLOWED_KEYS = DOCKER_CONFIG_KEYS + [
'build',
'container_name',
'dockerfile',
'log_driver',
'log_opt',
'logging',
'network_mode',
]

View File

@ -1248,6 +1248,24 @@ class ConfigTest(unittest.TestCase):
}
}
def test_merge_logging_v1(self):
base = {
'image': 'alpine:edge',
'log_driver': 'something',
'log_opt': {'foo': 'three'},
}
override = {
'image': 'alpine:edge',
'command': 'true',
}
actual = config.merge_service_dicts(base, override, V1)
assert actual == {
'image': 'alpine:edge',
'log_driver': 'something',
'log_opt': {'foo': 'three'},
'command': 'true',
}
def test_external_volume_config(self):
config_details = build_config_details({
'version': '2',