aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-01-26 16:00:32 -0600
committerBrent Baude <bbaude@redhat.com>2020-01-27 08:36:25 -0600
commit6181faa90de3a166004cca4fb6a8d85c17cbfe53 (patch)
treea47af8dbcfc1f01141b1d1ebc72d1cf88dabeea0 /test
parent40d36b1cf11be8f6e102a4bf28144d33082b453a (diff)
downloadpodman-6181faa90de3a166004cca4fb6a8d85c17cbfe53.tar.gz
podman-6181faa90de3a166004cca4fb6a8d85c17cbfe53.tar.bz2
podman-6181faa90de3a166004cca4fb6a8d85c17cbfe53.zip
inspect image healthchecks
when a docker image has a defined healthcheck, it should be displayed with inspect. this is only valid for docker images as oci images are not aware of healthchecks. Fixes: #4799 Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/inspect_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/e2e/inspect_test.go b/test/e2e/inspect_test.go
index 9d23384ea..ebac087ac 100644
--- a/test/e2e/inspect_test.go
+++ b/test/e2e/inspect_test.go
@@ -164,4 +164,17 @@ var _ = Describe("Podman inspect", func() {
Expect(inspectDst.ExitCode()).To(Equal(0))
Expect(inspectDst.OutputToString()).To(Equal("/test1"))
})
+
+ It("podman inspect shows healthcheck on docker image", func() {
+ pull := podmanTest.Podman([]string{"pull", healthcheck})
+ pull.WaitWithDefaultTimeout()
+ Expect(pull.ExitCode()).To(BeZero())
+
+ session := podmanTest.Podman([]string{"inspect", "--format=json", healthcheck})
+ session.WaitWithDefaultTimeout()
+ imageData := session.InspectImageJSON()
+ Expect(imageData[0].HealthCheck.Timeout).To(BeNumerically("==", 3000000000))
+ Expect(imageData[0].HealthCheck.Interval).To(BeNumerically("==", 60000000000))
+ Expect(imageData[0].HealthCheck.Test).To(Equal([]string{"CMD-SHELL", "curl -f http://localhost/ || exit 1"}))
+ })
})