Merge "Revert "docker/compose: quote health-cmd"" into stable/stein

This commit is contained in:
Zuul 2019-06-17 14:47:56 +00:00 committed by Gerrit Code Review
commit 3a81ee15ad
2 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ class ComposeV1Builder(base.BaseBuilder):
if 'healthcheck' in cconfig:
hconfig = cconfig['healthcheck']
if 'test' in hconfig:
cmd.append('--health-cmd="%s"' % hconfig['test'])
cmd.append('--health-cmd=%s' % hconfig['test'])
if 'interval' in hconfig:
cmd.append('--health-interval=%s' % hconfig['interval'])
if 'timeout' in hconfig:

View File

@ -29,7 +29,7 @@ class TestComposeV1Builder(tbb.TestBaseBuilder):
'uts': 'host',
'restart': 'always',
'healthcheck': {
'test': 'ls /mydir',
'test': '/bin/true',
'interval': '30s',
'timeout': '10s',
'retries': 3
@ -53,7 +53,7 @@ class TestComposeV1Builder(tbb.TestBaseBuilder):
['docker', 'run', '--name', 'one',
'--detach=true', '--env-file=/tmp/foo.env',
'--net=host', '--ipc=host', '--pid=container:bar',
'--uts=host', '--health-cmd="ls /mydir"', '--health-interval=30s',
'--uts=host', '--health-cmd=/bin/true', '--health-interval=30s',
'--health-timeout=10s', '--health-retries=3',
'--privileged=true', '--restart=always', '--user=bar',
'--log-opt=tag={{.ImageName}}/{{.Name}}/{{.ID}}',