aboutsummaryrefslogtreecommitdiff
path: root/test/python
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-01-22 10:52:18 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2021-01-25 18:01:22 -0500
commit74a63df0539ce1488353f03c7cb100ee4bbc7e73 (patch)
treed58bb96ae3b906c92c8d553a75510d9a2ed44f94 /test/python
parent3f5af4e80686cb732730bd27fe7fc1c64580c494 (diff)
downloadpodman-74a63df0539ce1488353f03c7cb100ee4bbc7e73.tar.gz
podman-74a63df0539ce1488353f03c7cb100ee4bbc7e73.tar.bz2
podman-74a63df0539ce1488353f03c7cb100ee4bbc7e73.zip
Fixup search
podman-remote search had some FIXMEs in tests that were failing. So I reworked the search handler to use the local abi. This means the podman search and podman-remote search will use the same functions. While doing this, I noticed we were just outputing errors via logrus.Error rather then returning them, which works ok for podman but the messages get lost on podman-remote. Changed the code to actually return the error messages to the caller. This allows us to turn on the remaining podman-remote FIXME tests. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/python')
-rw-r--r--test/python/docker/test_images.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/python/docker/test_images.py b/test/python/docker/test_images.py
index 1fa4aade9..f2b6a5190 100644
--- a/test/python/docker/test_images.py
+++ b/test/python/docker/test_images.py
@@ -82,8 +82,16 @@ class TestImages(unittest.TestCase):
def test_search_image(self):
"""Search for image"""
- for r in self.client.images.search("libpod/alpine"):
- self.assertIn("quay.io/libpod/alpine", r["Name"])
+ for r in self.client.images.search("alpine"):
+ self.assertIn("alpine", r["Name"])
+
+ def test_search_bogus_image(self):
+ """Search for bogus image should throw exception"""
+ try:
+ r = self.client.images.search("bogus/bogus")
+ except:
+ return
+ self.assertTrue(len(r)==0)
def test_remove_image(self):
"""Remove image"""