aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/e2e/images_test.go24
-rw-r--r--test/python/docker/compat/test_images.py3
2 files changed, 14 insertions, 13 deletions
diff --git a/test/e2e/images_test.go b/test/e2e/images_test.go
index 0a4d9b134..d34c911ad 100644
--- a/test/e2e/images_test.go
+++ b/test/e2e/images_test.go
@@ -186,24 +186,24 @@ WORKDIR /test
Expect(result.OutputToString()).To(Equal("/test"))
})
- It("podman images filter since image", func() {
- dockerfile := `FROM quay.io/libpod/alpine:latest
+ It("podman images filter since/after image", func() {
+ dockerfile := `FROM scratch
`
- podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false")
- result := podmanTest.Podman([]string{"images", "-q", "-f", "since=quay.io/libpod/alpine:latest"})
+ podmanTest.BuildImage(dockerfile, "foobar.com/one:latest", "false")
+ podmanTest.BuildImage(dockerfile, "foobar.com/two:latest", "false")
+ podmanTest.BuildImage(dockerfile, "foobar.com/three:latest", "false")
+
+ // `since` filter
+ result := podmanTest.PodmanNoCache([]string{"images", "-q", "-f", "since=foobar.com/one:latest"})
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
- Expect(result.OutputToStringArray()).To(HaveLen(9))
- })
+ Expect(result.OutputToStringArray()).To(HaveLen(2))
- It("podman image list filter after image", func() {
- dockerfile := `FROM quay.io/libpod/alpine:latest
-`
- podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false")
- result := podmanTest.Podman([]string{"image", "list", "-q", "-f", "after=quay.io/libpod/alpine:latest"})
+ // `after` filter
+ result = podmanTest.Podman([]string{"image", "list", "-q", "-f", "after=foobar.com/one:latest"})
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
- Expect(result.OutputToStringArray()).Should(HaveLen(9), "list filter output: %q", result.OutputToString())
+ Expect(result.OutputToStringArray()).Should(HaveLen(2), "list filter output: %q", result.OutputToString())
})
It("podman images filter dangling", func() {
diff --git a/test/python/docker/compat/test_images.py b/test/python/docker/compat/test_images.py
index 485a0e419..05d0e3e12 100644
--- a/test/python/docker/compat/test_images.py
+++ b/test/python/docker/compat/test_images.py
@@ -87,7 +87,8 @@ class TestImages(unittest.TestCase):
def test_search_image(self):
"""Search for image"""
for r in self.client.images.search("alpine"):
- self.assertIn("alpine", r["Name"])
+ # registry matches if string is in either one
+ self.assertIn("alpine", r["Name"]+" "+r["Description"].lower())
def test_search_bogus_image(self):
"""Search for bogus image should throw exception"""