summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-02-22 10:19:11 -0600
committerBrent Baude <bbaude@redhat.com>2020-02-22 12:45:15 -0600
commit0184714a82696feec33b383bfd98875712173e6e (patch)
tree1cecbe40de371ac953f947170246160df279c727 /test
parent2850ec5f507ee6c3202f09e099b01a4e550ef0d9 (diff)
downloadpodman-0184714a82696feec33b383bfd98875712173e6e.tar.gz
podman-0184714a82696feec33b383bfd98875712173e6e.tar.bz2
podman-0184714a82696feec33b383bfd98875712173e6e.zip
Add --no-healthcheck command to create/run
Now support --no-healthcheck option to disable defined healthchecks in a container image. --health-cmd=none remains supported as well. Fixes: #5299 Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/healthcheck_run_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/e2e/healthcheck_run_test.go b/test/e2e/healthcheck_run_test.go
index 7633261e3..19a8658ac 100644
--- a/test/e2e/healthcheck_run_test.go
+++ b/test/e2e/healthcheck_run_test.go
@@ -41,6 +41,26 @@ var _ = Describe("Podman healthcheck run", func() {
Expect(session).To(ExitWithError())
})
+ It("podman disable healthcheck with --no-healthcheck on valid container", func() {
+ SkipIfRemote()
+ session := podmanTest.Podman([]string{"run", "-dt", "--no-healthcheck", "--name", "hc", healthcheck})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ hc := podmanTest.Podman([]string{"healthcheck", "run", "hc"})
+ hc.WaitWithDefaultTimeout()
+ Expect(hc.ExitCode()).To(Equal(125))
+ })
+
+ It("podman disable healthcheck with --health-cmd=none on valid container", func() {
+ SkipIfRemote()
+ session := podmanTest.Podman([]string{"run", "-dt", "--health-cmd", "none", "--name", "hc", healthcheck})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ hc := podmanTest.Podman([]string{"healthcheck", "run", "hc"})
+ hc.WaitWithDefaultTimeout()
+ Expect(hc.ExitCode()).To(Equal(125))
+ })
+
It("podman healthcheck on valid container", func() {
Skip("Extremely consistent flake - re-enable on debugging")
session := podmanTest.Podman([]string{"run", "-dt", "--name", "hc", healthcheck})