mirror of
https://github.com/containers/podman.git
synced 2025-05-24 02:27:00 +08:00
Add sha256: to images history id for docker compatibility
Fixes: https://github.com/containers/podman/issues/17762 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -70,12 +70,11 @@ class TestImages(common.DockerTestCase):
|
||||
"""Image history"""
|
||||
img = self.docker.images.get(constant.ALPINE)
|
||||
history = img.history()
|
||||
image_id = img.id[7:] if img.id.startswith("sha256:") else img.id
|
||||
|
||||
found = False
|
||||
for change in history:
|
||||
found |= image_id in change.values()
|
||||
self.assertTrue(found, f"image id {image_id} not found in history")
|
||||
found |= img.id in change.values()
|
||||
self.assertTrue(found, f"image id {img.id} not found in history")
|
||||
|
||||
def test_get_image_exists_not(self):
|
||||
"""Negative test for get image"""
|
||||
|
Reference in New Issue
Block a user