summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-03-22 14:44:26 +0100
committerGitHub <noreply@github.com>2022-03-22 14:44:26 +0100
commit02aae4a65856305f657bc3684ad1ac2a47fbc30e (patch)
tree4b358ab3c8f547ff146dc364b98838ae9dc642b3 /test
parentd0e9f28f87d4fc9e7ed8f465709db89a03b9376b (diff)
parent6d6bdabc8c3fd10f5770fb79d6d8702bc6cc4ec6 (diff)
downloadpodman-02aae4a65856305f657bc3684ad1ac2a47fbc30e.tar.gz
podman-02aae4a65856305f657bc3684ad1ac2a47fbc30e.tar.bz2
podman-02aae4a65856305f657bc3684ad1ac2a47fbc30e.zip
Merge pull request #13585 from flouthoc/fix-no-healthcheck
healthcheck: stop showing wrong status when `--no-healthcheck` is set
Diffstat (limited to 'test')
-rw-r--r--test/e2e/healthcheck_run_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/e2e/healthcheck_run_test.go b/test/e2e/healthcheck_run_test.go
index 866edbf0e..757eaed20 100644
--- a/test/e2e/healthcheck_run_test.go
+++ b/test/e2e/healthcheck_run_test.go
@@ -54,6 +54,16 @@ var _ = Describe("Podman healthcheck run", func() {
Expect(hc).Should(Exit(125))
})
+ It("podman disable healthcheck with --no-healthcheck must not show starting on status", func() {
+ session := podmanTest.Podman([]string{"run", "-dt", "--no-healthcheck", "--name", "hc", healthcheck})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ hc := podmanTest.Podman([]string{"container", "inspect", "--format", "{{.State.Health.Status}}", "hc"})
+ hc.WaitWithDefaultTimeout()
+ Expect(hc).Should(Exit(0))
+ Expect(hc.OutputToString()).To(Not(ContainSubstring("starting")))
+ })
+
It("podman run healthcheck and logs should contain healthcheck output", func() {
session := podmanTest.Podman([]string{"run", "--name", "test-logs", "-dt", "--health-interval", "1s", "--health-cmd", "echo working", "busybox", "sleep", "3600"})
session.WaitWithDefaultTimeout()