From b1f5e861b0fa9220fbf2e95a2580892f98a803ca Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Mon, 20 Dec 2021 17:27:02 +0100 Subject: compat: image normalization: handle sha256 prefix When normalizing image names on the compat API, make sure to take the `sha256:` prefix into account when matching against the image ID. Otherwise, the name will mistakingly be subject to docker.io normalization. Signed-off-by: Valentin Rothberg Signed-off-by: Daniel J Walsh --- test/python/docker/compat/test_images.py | 1 + 1 file changed, 1 insertion(+) (limited to 'test/python') diff --git a/test/python/docker/compat/test_images.py b/test/python/docker/compat/test_images.py index 1e2b531b7..485a0e419 100644 --- a/test/python/docker/compat/test_images.py +++ b/test/python/docker/compat/test_images.py @@ -79,6 +79,7 @@ class TestImages(unittest.TestCase): # Add more images self.client.images.pull(constant.BB) self.assertEqual(len(self.client.images.list()), 2) + self.assertEqual(len(self.client.images.list(all=True)), 2) # List images with filter self.assertEqual(len(self.client.images.list(filters={"reference": "alpine"})), 1) -- cgit v1.2.3-54-g00ecf