summaryrefslogtreecommitdiff
path: root/test/apiv2/python
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-09-20 13:19:50 +0200
committerPaul Holzinger <pholzing@redhat.com>2021-09-23 14:44:34 +0200
commit1199733754b1185d0d2a7a3d832c57565864d0f4 (patch)
tree20f7a33df89744836959f308e2faa8fa07f6ef95 /test/apiv2/python
parentaa628b82b1c2f04fb3a9a9207bb6d6bddb497fbb (diff)
downloadpodman-1199733754b1185d0d2a7a3d832c57565864d0f4.tar.gz
podman-1199733754b1185d0d2a7a3d832c57565864d0f4.tar.bz2
podman-1199733754b1185d0d2a7a3d832c57565864d0f4.zip
podman inspect add State.Health field for docker compat
podman inspect shows the healthcheck status in `.State.Healthcheck`, docker uses `.State.Health`. To make sure docker scripts work we should add the `Health` key. Because we do not want to display both keys by default we only use the new `Health` key. This is a breaking change for podman users but matches what docker does. To provide some form of compatibility users can still use `--format {{.State.Healthcheck}}`. IT is just not shown by default. Fixes #11645 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'test/apiv2/python')
-rw-r--r--test/apiv2/python/rest_api/test_v2_0_0_container.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/apiv2/python/rest_api/test_v2_0_0_container.py b/test/apiv2/python/rest_api/test_v2_0_0_container.py
index dbad6824f..853e9da88 100644
--- a/test/apiv2/python/rest_api/test_v2_0_0_container.py
+++ b/test/apiv2/python/rest_api/test_v2_0_0_container.py
@@ -56,7 +56,7 @@ class ContainerTestCase(APITestCase):
self.assertEqual(r.status_code, 200, r.text)
self.assertId(r.content)
out = r.json()
- self.assertIsNone(out["State"].get("Health"))
+ self.assertIsNotNone(out["State"].get("Health"))
self.assertListEqual(["CMD", "pidof", "top"], out["Config"]["Healthcheck"]["Test"])
self.assertEqual(5000000000, out["Config"]["Healthcheck"]["Interval"])
self.assertEqual(2000000000, out["Config"]["Healthcheck"]["Timeout"])