summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-23 11:34:42 -0400
committerGitHub <noreply@github.com>2021-09-23 11:34:42 -0400
commite8fc990aadf438e3b138d77b1bb4500cc60a7738 (patch)
tree641a8b9e92c3a986d38a42068cc092af6b72a736 /test/e2e
parentc2beea695857b71250c87eb9ab799f7773b8d251 (diff)
parent1199733754b1185d0d2a7a3d832c57565864d0f4 (diff)
downloadpodman-e8fc990aadf438e3b138d77b1bb4500cc60a7738.tar.gz
podman-e8fc990aadf438e3b138d77b1bb4500cc60a7738.tar.bz2
podman-e8fc990aadf438e3b138d77b1bb4500cc60a7738.zip
Merge pull request #11654 from Luap99/health-docker
podman inspect add State.Health field for docker compat
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/healthcheck_run_test.go21
1 files changed, 12 insertions, 9 deletions
diff --git a/test/e2e/healthcheck_run_test.go b/test/e2e/healthcheck_run_test.go
index 1445a634b..2826f2b34 100644
--- a/test/e2e/healthcheck_run_test.go
+++ b/test/e2e/healthcheck_run_test.go
@@ -117,7 +117,7 @@ var _ = Describe("Podman healthcheck run", func() {
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
inspect := podmanTest.InspectContainer("hc")
- Expect(inspect[0].State.Healthcheck.Status).To(Equal("starting"))
+ Expect(inspect[0].State.Health.Status).To(Equal("starting"))
})
It("podman healthcheck failed checks in start-period should not change status", func() {
@@ -138,7 +138,9 @@ var _ = Describe("Podman healthcheck run", func() {
Expect(hc).Should(Exit(1))
inspect := podmanTest.InspectContainer("hc")
- Expect(inspect[0].State.Healthcheck.Status).To(Equal("starting"))
+ Expect(inspect[0].State.Health.Status).To(Equal("starting"))
+ // test old podman compat (see #11645)
+ Expect(inspect[0].State.Healthcheck().Status).To(Equal("starting"))
})
It("podman healthcheck failed checks must reach retries before unhealthy ", func() {
@@ -151,15 +153,16 @@ var _ = Describe("Podman healthcheck run", func() {
Expect(hc).Should(Exit(1))
inspect := podmanTest.InspectContainer("hc")
- Expect(inspect[0].State.Healthcheck.Status).To(Equal("starting"))
+ Expect(inspect[0].State.Health.Status).To(Equal("starting"))
hc = podmanTest.Podman([]string{"healthcheck", "run", "hc"})
hc.WaitWithDefaultTimeout()
Expect(hc).Should(Exit(1))
inspect = podmanTest.InspectContainer("hc")
- Expect(inspect[0].State.Healthcheck.Status).To(Equal(define.HealthCheckUnhealthy))
-
+ Expect(inspect[0].State.Health.Status).To(Equal(define.HealthCheckUnhealthy))
+ // test old podman compat (see #11645)
+ Expect(inspect[0].State.Healthcheck().Status).To(Equal(define.HealthCheckUnhealthy))
})
It("podman healthcheck good check results in healthy even in start-period", func() {
@@ -172,7 +175,7 @@ var _ = Describe("Podman healthcheck run", func() {
Expect(hc).Should(Exit(0))
inspect := podmanTest.InspectContainer("hc")
- Expect(inspect[0].State.Healthcheck.Status).To(Equal(define.HealthCheckHealthy))
+ Expect(inspect[0].State.Health.Status).To(Equal(define.HealthCheckHealthy))
})
It("podman healthcheck unhealthy but valid arguments check", func() {
@@ -195,14 +198,14 @@ var _ = Describe("Podman healthcheck run", func() {
Expect(hc).Should(Exit(1))
inspect := podmanTest.InspectContainer("hc")
- Expect(inspect[0].State.Healthcheck.Status).To(Equal("starting"))
+ Expect(inspect[0].State.Health.Status).To(Equal("starting"))
hc = podmanTest.Podman([]string{"healthcheck", "run", "hc"})
hc.WaitWithDefaultTimeout()
Expect(hc).Should(Exit(1))
inspect = podmanTest.InspectContainer("hc")
- Expect(inspect[0].State.Healthcheck.Status).To(Equal(define.HealthCheckUnhealthy))
+ Expect(inspect[0].State.Health.Status).To(Equal(define.HealthCheckUnhealthy))
foo := podmanTest.Podman([]string{"exec", "hc", "touch", "/foo"})
foo.WaitWithDefaultTimeout()
@@ -213,7 +216,7 @@ var _ = Describe("Podman healthcheck run", func() {
Expect(hc).Should(Exit(0))
inspect = podmanTest.InspectContainer("hc")
- Expect(inspect[0].State.Healthcheck.Status).To(Equal(define.HealthCheckHealthy))
+ Expect(inspect[0].State.Health.Status).To(Equal(define.HealthCheckHealthy))
// Test podman ps --filter heath is working (#11687)
ps := podmanTest.Podman([]string{"ps", "--filter", "health=healthy"})