mirror of
https://github.com/docker/compose.git
synced 2025-07-21 12:44:54 +02:00
Add stop_grace_period to ALLOWED_KEYS
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
cc23ffbeb9
commit
7d628ad1ab
@ -126,6 +126,7 @@ ALLOWED_KEYS = DOCKER_CONFIG_KEYS + [
|
|||||||
'network_mode',
|
'network_mode',
|
||||||
'init',
|
'init',
|
||||||
'scale',
|
'scale',
|
||||||
|
'stop_grace_period',
|
||||||
]
|
]
|
||||||
|
|
||||||
DOCKER_VALID_URL_PREFIXES = (
|
DOCKER_VALID_URL_PREFIXES = (
|
||||||
|
@ -1150,7 +1150,8 @@ class ConfigTest(unittest.TestCase):
|
|||||||
'volumes': [
|
'volumes': [
|
||||||
{'source': '/a', 'target': '/b', 'type': 'bind'},
|
{'source': '/a', 'target': '/b', 'type': 'bind'},
|
||||||
{'source': 'vol', 'target': '/x', 'type': 'volume', 'read_only': True}
|
{'source': 'vol', 'target': '/x', 'type': 'volume', 'read_only': True}
|
||||||
]
|
],
|
||||||
|
'stop_grace_period': '30s',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'volumes': {'vol': {}}
|
'volumes': {'vol': {}}
|
||||||
@ -1177,6 +1178,7 @@ class ConfigTest(unittest.TestCase):
|
|||||||
'/c:/b:rw',
|
'/c:/b:rw',
|
||||||
{'source': 'vol', 'target': '/x', 'type': 'volume', 'read_only': True}
|
{'source': 'vol', 'target': '/x', 'type': 'volume', 'read_only': True}
|
||||||
]
|
]
|
||||||
|
assert service_dicts[0]['stop_grace_period'] == '30s'
|
||||||
|
|
||||||
@mock.patch.dict(os.environ)
|
@mock.patch.dict(os.environ)
|
||||||
def test_volume_mode_override(self):
|
def test_volume_mode_override(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user