diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-11-09 16:57:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-09 16:57:29 +0100 |
commit | ad4366ad24eee27957ec04f5dd9a34f4a85541e8 (patch) | |
tree | 27e99320bc4836d6264747adda2f573e190b5423 /test/e2e | |
parent | c996d9f11ea1b480e7041426b70878ca75fc5519 (diff) | |
parent | faf450ea18179bb0e4ae1213d3ca6c126b04b452 (diff) | |
download | podman-ad4366ad24eee27957ec04f5dd9a34f4a85541e8.tar.gz podman-ad4366ad24eee27957ec04f5dd9a34f4a85541e8.tar.bz2 podman-ad4366ad24eee27957ec04f5dd9a34f4a85541e8.zip |
Merge pull request #12239 from vrothberg/fix-12226
support health checks from image configs
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/healthcheck_run_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/e2e/healthcheck_run_test.go b/test/e2e/healthcheck_run_test.go index b2666c789..c9a6f926f 100644 --- a/test/e2e/healthcheck_run_test.go +++ b/test/e2e/healthcheck_run_test.go @@ -52,6 +52,18 @@ var _ = Describe("Podman healthcheck run", func() { Expect(hc).Should(Exit(125)) }) + It("podman healthcheck from image's config (not container config)", func() { + // Regression test for #12226: a health check may be defined in + // the container or the container-config of an image. + session := podmanTest.Podman([]string{"create", "--name", "hc", "quay.io/libpod/healthcheck:config-only", "ls"}) + session.WaitWithDefaultTimeout() + Expect(session).Should(Exit(0)) + hc := podmanTest.Podman([]string{"container", "inspect", "--format", "{{.Config.Healthcheck}}", "hc"}) + hc.WaitWithDefaultTimeout() + Expect(hc).Should(Exit(0)) + Expect(hc.OutputToString()).To(Equal("{[CMD-SHELL curl -f http://localhost/ || exit 1] 0s 5m0s 3s 0}")) + }) + It("podman disable healthcheck with --health-cmd=none on valid container", func() { session := podmanTest.Podman([]string{"run", "-dt", "--health-cmd", "none", "--name", "hc", healthcheck}) session.WaitWithDefaultTimeout() |