summaryrefslogtreecommitdiff
path: root/test/apiv2
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-09-20 13:43:30 +0200
committerPaul Holzinger <pholzing@redhat.com>2021-09-20 13:47:29 +0200
commit5242030ac275e497b6b91186bb6305b5cb40c96a (patch)
treeb5b0315b84add3e004b929a335a6cbceff4a49f4 /test/apiv2
parentddb384451147c4ef9d0307be0cc8dbad6d94970c (diff)
downloadpodman-5242030ac275e497b6b91186bb6305b5cb40c96a.tar.gz
podman-5242030ac275e497b6b91186bb6305b5cb40c96a.tar.bz2
podman-5242030ac275e497b6b91186bb6305b5cb40c96a.zip
compat API: /images/json prefix image id with sha256
Docker adds the `sha256:` prefix to the image ID, so our compat endpoint has to do this as well. Fixes #11623 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'test/apiv2')
-rw-r--r--test/apiv2/python/rest_api/test_v2_0_0_image.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/apiv2/python/rest_api/test_v2_0_0_image.py b/test/apiv2/python/rest_api/test_v2_0_0_image.py
index bcacaa935..58d03b149 100644
--- a/test/apiv2/python/rest_api/test_v2_0_0_image.py
+++ b/test/apiv2/python/rest_api/test_v2_0_0_image.py
@@ -32,6 +32,9 @@ class ImageTestCase(APITestCase):
for k in required_keys:
self.assertIn(k, item)
+ # Id should be prefixed with sha256: (#11645)
+ self.assertIn("sha256:",item['Id'])
+
def test_inspect(self):
r = requests.get(self.podman_url + "/v1.40/images/alpine/json")
self.assertEqual(r.status_code, 200, r.text)
@@ -59,6 +62,8 @@ class ImageTestCase(APITestCase):
for item in required_keys:
self.assertIn(item, image)
_ = parse(image["Created"])
+ # Id should be prefixed with sha256: (#11645)
+ self.assertIn("sha256:",image['Id'])
def test_delete(self):
r = requests.delete(self.podman_url + "/v1.40/images/alpine?force=true")