diff options
author | baude <bbaude@redhat.com> | 2021-03-01 08:42:48 -0600 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2021-03-02 10:56:28 -0600 |
commit | 2c8c5393a492929b75dd459889a1c1ef28e2b393 (patch) | |
tree | f166e5fdf24dc5b010c35f77130bf7337646ff52 /test/python/docker/compat/test_images.py | |
parent | 7497dcba6cd240908a9b0948eb561ad9c264fc8f (diff) | |
download | podman-2c8c5393a492929b75dd459889a1c1ef28e2b393.tar.gz podman-2c8c5393a492929b75dd459889a1c1ef28e2b393.tar.bz2 podman-2c8c5393a492929b75dd459889a1c1ef28e2b393.zip |
Support label type dict on compat build
The compatibility endpoint for build labels should be of type dict (not
list). For backwards compatibility, we support both.
Fixes: #9517
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'test/python/docker/compat/test_images.py')
-rw-r--r-- | test/python/docker/compat/test_images.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/python/docker/compat/test_images.py b/test/python/docker/compat/test_images.py index 842e38f31..4a90069a9 100644 --- a/test/python/docker/compat/test_images.py +++ b/test/python/docker/compat/test_images.py @@ -149,6 +149,14 @@ class TestImages(unittest.TestCase): self.assertEqual(len(self.client.images.list()), 2) + def test_build_image(self): + labels = {"apple": "red", "grape": "green"} + _ = self.client.images.build(path="test/python/docker/build_labels", labels=labels, tag="labels") + image = self.client.images.get("labels") + self.assertEqual(image.labels["apple"], labels["apple"]) + self.assertEqual(image.labels["grape"], labels["grape"]) + + if __name__ == "__main__": # Setup temporary space |