diff options
author | cdoern <cbdoer23@g.holycross.edu> | 2021-07-26 09:05:05 -0400 |
---|---|---|
committer | cdoern <cdoern@redhat.com> | 2021-07-28 09:52:41 -0400 |
commit | a9f6592af6646d3692e8a7260df98dd606aa4d9b (patch) | |
tree | d4fe0c7816873543f5fccc089468321f3ac7fabc /test/e2e/healthcheck_run_test.go | |
parent | fd1f57b3a667f69bb2ae424ec7a7735ef8f1fda4 (diff) | |
download | podman-a9f6592af6646d3692e8a7260df98dd606aa4d9b.tar.gz podman-a9f6592af6646d3692e8a7260df98dd606aa4d9b.tar.bz2 podman-a9f6592af6646d3692e8a7260df98dd606aa4d9b.zip |
Fixed Healthcheck formatting, string to []string
Compat healthcheck tests are of the format []string but podman's were of
the format string. Converted podman's to []string at the specgen level since it has the same effect
and removed the incorrect parsing of compat healthchecks.
fixes #10617
Signed-off-by: cdoern <cdoern@redhat.com>
Diffstat (limited to 'test/e2e/healthcheck_run_test.go')
-rw-r--r-- | test/e2e/healthcheck_run_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/e2e/healthcheck_run_test.go b/test/e2e/healthcheck_run_test.go index ed7958323..bea22ea85 100644 --- a/test/e2e/healthcheck_run_test.go +++ b/test/e2e/healthcheck_run_test.go @@ -173,6 +173,16 @@ var _ = Describe("Podman healthcheck run", func() { Expect(inspect[0].State.Healthcheck.Status).To(Equal("healthy")) }) + It("podman healthcheck unhealthy but valid arguments check", func() { + session := podmanTest.Podman([]string{"run", "-dt", "--name", "hc", "--health-retries", "2", "--health-cmd", "[\"ls\", \"/foo\"]", ALPINE, "top"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + hc := podmanTest.Podman([]string{"healthcheck", "run", "hc"}) + hc.WaitWithDefaultTimeout() + Expect(hc.ExitCode()).To(Equal(1)) + }) + It("podman healthcheck single healthy result changes failed to healthy", func() { session := podmanTest.Podman([]string{"run", "-dt", "--name", "hc", "--health-retries", "2", "--health-cmd", "ls /foo || exit 1", ALPINE, "top"}) session.WaitWithDefaultTimeout() |