mirror of https://github.com/docker/compose.git
`scale` property should be merged according to standard scalar rules
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
ec4ba7752f
commit
0916f124d0
|
@ -116,6 +116,7 @@ ALLOWED_KEYS = DOCKER_CONFIG_KEYS + [
|
|||
'logging',
|
||||
'network_mode',
|
||||
'init',
|
||||
'scale',
|
||||
]
|
||||
|
||||
DOCKER_VALID_URL_PREFIXES = (
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue