`scale` property should be merged according to standard scalar rules

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F 2017-07-03 17:12:39 -07:00 committed by Joffrey F
parent ec4ba7752f
commit 0916f124d0
2 changed files with 14 additions and 0 deletions

View File

@ -116,6 +116,7 @@ ALLOWED_KEYS = DOCKER_CONFIG_KEYS + [
'logging',
'network_mode',
'init',
'scale',
]
DOCKER_VALID_URL_PREFIXES = (

View File

@ -2098,6 +2098,19 @@ class ConfigTest(unittest.TestCase):
actual = config.merge_service_dicts(base, override, V3_3)
assert actual['credential_spec'] == override['credential_spec']
def test_merge_scale(self):
base = {
'image': 'bar',
'scale': 2,
}
override = {
'scale': 4,
}
actual = config.merge_service_dicts(base, override, V2_2)
assert actual == {'image': 'bar', 'scale': 4}
def test_external_volume_config(self):
config_details = build_config_details({
'version': '2',