summaryrefslogtreecommitdiff
path: root/test/e2e/run_test.go
diff options
context:
space:
mode:
authorStefan Becker <chemobejk@gmail.com>2019-07-13 18:22:41 +0300
committerStefan Becker <chemobejk@gmail.com>2019-07-14 10:33:01 +0300
commite4cba7d36a49353febfefcb25d2d820bc89e9d1b (patch)
treeda0d158215568fba288cd1db6a059c57c82c5fc9 /test/e2e/run_test.go
parentc59d08bc77855c0d0d946fa44850a0bf03b102c9 (diff)
downloadpodman-e4cba7d36a49353febfefcb25d2d820bc89e9d1b.tar.gz
podman-e4cba7d36a49353febfefcb25d2d820bc89e9d1b.tar.bz2
podman-e4cba7d36a49353febfefcb25d2d820bc89e9d1b.zip
create: improve parser for --healthcheck-command
Fix Docker CLI compatibility issue: the "--healthcheck-command" option value should not be split but instead be passed as single string to "CMD-SHELL", i.e. "/bin/sh -c <opt>". On the other hand implement the same extension as is already available for "--entrypoint", i.e. allow the option value to be a JSON array of strings. This will make life easier for tools like podman-compose. Updated "--healthcheck-command" option values in tests accordingly. Continuation of #3455 & #3507 Signed-off-by: Stefan Becker <chemobejk@gmail.com>
Diffstat (limited to 'test/e2e/run_test.go')
-rw-r--r--test/e2e/run_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 8c7830204..886e3e7a9 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -750,21 +750,21 @@ USER mail`
})
It("podman run with bad healthcheck retries", func() {
- session := podmanTest.Podman([]string{"run", "-dt", "--healthcheck-command", "foo", "--healthcheck-retries", "0", ALPINE, "top"})
+ session := podmanTest.Podman([]string{"run", "-dt", "--healthcheck-command", "[\"foo\"]", "--healthcheck-retries", "0", ALPINE, "top"})
session.Wait()
Expect(session.ExitCode()).ToNot(Equal(0))
Expect(session.ErrorToString()).To(ContainSubstring("healthcheck-retries must be greater than 0"))
})
It("podman run with bad healthcheck timeout", func() {
- session := podmanTest.Podman([]string{"run", "-dt", "--healthcheck-command", "foo", "--healthcheck-timeout", "0s", ALPINE, "top"})
+ session := podmanTest.Podman([]string{"run", "-dt", "--healthcheck-command", "[\"foo\"]", "--healthcheck-timeout", "0s", ALPINE, "top"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).ToNot(Equal(0))
Expect(session.ErrorToString()).To(ContainSubstring("healthcheck-timeout must be at least 1 second"))
})
It("podman run with bad healthcheck start-period", func() {
- session := podmanTest.Podman([]string{"run", "-dt", "--healthcheck-command", "foo", "--healthcheck-start-period", "-1s", ALPINE, "top"})
+ session := podmanTest.Podman([]string{"run", "-dt", "--healthcheck-command", "[\"foo\"]", "--healthcheck-start-period", "-1s", ALPINE, "top"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).ToNot(Equal(0))
Expect(session.ErrorToString()).To(ContainSubstring("healthcheck-start-period must be 0 seconds or greater"))