summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-12-17 02:25:49 +0100
committerGitHub <noreply@github.com>2021-12-17 02:25:49 +0100
commitc9a3f4ec44c4507c0a801635b93d840723826b7a (patch)
tree3497f656c5bf82b926f5db9f4d80094d1f39a852 /test
parent52d5f367b144f755dd20b18d88c5f79bc6b0c3fe (diff)
parente88c21366d33dccb25ef292610b9894aa5087260 (diff)
downloadpodman-c9a3f4ec44c4507c0a801635b93d840723826b7a.tar.gz
podman-c9a3f4ec44c4507c0a801635b93d840723826b7a.tar.bz2
podman-c9a3f4ec44c4507c0a801635b93d840723826b7a.zip
Merge pull request #12634 from baude/bz2024229
Removed .service file for healthchecks
Diffstat (limited to 'test')
-rw-r--r--test/e2e/healthcheck_run_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/e2e/healthcheck_run_test.go b/test/e2e/healthcheck_run_test.go
index 6e4dc5bbf..c2084a6fd 100644
--- a/test/e2e/healthcheck_run_test.go
+++ b/test/e2e/healthcheck_run_test.go
@@ -242,4 +242,20 @@ var _ = Describe("Podman healthcheck run", func() {
Expect(ps.OutputToStringArray()).To(HaveLen(2))
Expect(ps.OutputToString()).To(ContainSubstring("hc"))
})
+
+ It("stopping and then starting a container with healthcheck cmd", func() {
+ session := podmanTest.Podman([]string{"run", "-dt", "--name", "hc", "--health-cmd", "[\"ls\", \"/foo\"]", ALPINE, "top"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+
+ stop := podmanTest.Podman([]string{"stop", "-t0", "hc"})
+ stop.WaitWithDefaultTimeout()
+ Expect(stop).Should(Exit(0))
+
+ startAgain := podmanTest.Podman([]string{"start", "hc"})
+ startAgain.WaitWithDefaultTimeout()
+ Expect(startAgain).Should(Exit(0))
+ Expect(startAgain.OutputToString()).To(Equal("hc"))
+ Expect(startAgain.ErrorToString()).To(Equal(""))
+ })
})