mirror of https://github.com/docker/compose.git
Merge pull request #4291 from shin-/unify-healthcheck-def-v2v3
Unify healthcheck spec definition in v2 and v3
This commit is contained in:
commit
838bdd71f3
|
@ -675,7 +675,7 @@ def process_healthcheck(service_dict, service_name):
|
|||
hc = {}
|
||||
raw = service_dict['healthcheck']
|
||||
|
||||
if raw.get('disable') or raw.get('disabled'):
|
||||
if raw.get('disable'):
|
||||
if len(raw) > 1:
|
||||
raise ConfigurationError(
|
||||
'Service "{}" defines an invalid healthcheck: '
|
||||
|
|
|
@ -258,7 +258,7 @@
|
|||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"disabled": {"type": "boolean"},
|
||||
"disable": {"type": "boolean"},
|
||||
"interval": {"type": "string"},
|
||||
"retries": {"type": "number"},
|
||||
"test": {
|
||||
|
|
|
@ -202,10 +202,11 @@
|
|||
|
||||
"healthcheck": {
|
||||
"id": "#/definitions/healthcheck",
|
||||
"type": ["object", "null"],
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"interval": {"type":"string"},
|
||||
"timeout": {"type":"string"},
|
||||
"disable": {"type": "boolean"},
|
||||
"interval": {"type": "string"},
|
||||
"retries": {"type": "number"},
|
||||
"test": {
|
||||
"oneOf": [
|
||||
|
@ -213,9 +214,8 @@
|
|||
{"type": "array", "items": {"type": "string"}}
|
||||
]
|
||||
},
|
||||
"disable": {"type": "boolean"}
|
||||
},
|
||||
"additionalProperties": false
|
||||
"timeout": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"deployment": {
|
||||
"id": "#/definitions/deployment",
|
||||
|
|
|
@ -1463,7 +1463,7 @@ class ProjectTest(DockerClientTestCase):
|
|||
'image': 'busybox:latest',
|
||||
'command': 'top',
|
||||
'healthcheck': {
|
||||
'disabled': True
|
||||
'disable': True
|
||||
},
|
||||
},
|
||||
'svc2': {
|
||||
|
|
Loading…
Reference in New Issue