diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-03-04 11:09:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-04 11:09:25 -0500 |
commit | 7a92de4bacdff145a871371d5a306bd349e83374 (patch) | |
tree | 359bcacb5843281732d4e26bad9935427efd5215 /test/python/docker | |
parent | 7b76340864a7a5ba9e1008a017402d2b4a14032e (diff) | |
parent | 2c8c5393a492929b75dd459889a1c1ef28e2b393 (diff) | |
download | podman-7a92de4bacdff145a871371d5a306bd349e83374.tar.gz podman-7a92de4bacdff145a871371d5a306bd349e83374.tar.bz2 podman-7a92de4bacdff145a871371d5a306bd349e83374.zip |
Merge pull request #9550 from baude/issue9517
Support label type dict on compat build
Diffstat (limited to 'test/python/docker')
-rw-r--r-- | test/python/docker/build_labels/Dockerfile | 1 | ||||
-rw-r--r-- | test/python/docker/compat/test_images.py | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/test/python/docker/build_labels/Dockerfile b/test/python/docker/build_labels/Dockerfile new file mode 100644 index 000000000..f6e07066c --- /dev/null +++ b/test/python/docker/build_labels/Dockerfile @@ -0,0 +1 @@ +FROM quay.io/libpod/alpine:latest 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 |