summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-03-06 04:47:33 -0800
committerGitHub <noreply@github.com>2019-03-06 04:47:33 -0800
commit2dc8568368b6ef9fe3f31fd791b850205b303564 (patch)
tree805e3c65caa3abfafe62ea457af8e57f29eb0e52 /test/e2e
parent40f78439459d0899de8643661b8e996a1e2460d6 (diff)
parenta8d6d7dce7a756f058bb61e9268084c9427fc29e (diff)
downloadpodman-2dc8568368b6ef9fe3f31fd791b850205b303564.tar.gz
podman-2dc8568368b6ef9fe3f31fd791b850205b303564.tar.bz2
podman-2dc8568368b6ef9fe3f31fd791b850205b303564.zip
Merge pull request #2430 from QiWang19/issfiltet
Support filter image by reference to the image name
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/images_test.go27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/e2e/images_test.go b/test/e2e/images_test.go
index e26f4affd..4cf58e5bf 100644
--- a/test/e2e/images_test.go
+++ b/test/e2e/images_test.go
@@ -114,6 +114,33 @@ var _ = Describe("Podman images", func() {
Expect(len(session.OutputToStringArray())).To(Equal(1))
})
+ It("podman images filter reference", func() {
+ if podmanTest.RemoteTest {
+ Skip("Does not work on remote client")
+ }
+ result := podmanTest.Podman([]string{"images", "-q", "-f", "reference=docker.io*"})
+ result.WaitWithDefaultTimeout()
+ Expect(result.ExitCode()).To(Equal(0))
+ Expect(len(result.OutputToStringArray())).To(Equal(2))
+
+ retapline := podmanTest.Podman([]string{"images", "-f", "reference=a*pine"})
+ retapline.WaitWithDefaultTimeout()
+ Expect(retapline.ExitCode()).To(Equal(0))
+ Expect(len(retapline.OutputToStringArray())).To(Equal(2))
+ Expect(retapline.LineInOutputContains("alpine"))
+
+ retapline = podmanTest.Podman([]string{"images", "-f", "reference=alpine"})
+ retapline.WaitWithDefaultTimeout()
+ Expect(retapline.ExitCode()).To(Equal(0))
+ Expect(len(retapline.OutputToStringArray())).To(Equal(2))
+ Expect(retapline.LineInOutputContains("alpine"))
+
+ retnone := podmanTest.Podman([]string{"images", "-q", "-f", "reference=bogus"})
+ retnone.WaitWithDefaultTimeout()
+ Expect(retnone.ExitCode()).To(Equal(0))
+ Expect(len(retnone.OutputToStringArray())).To(Equal(0))
+ })
+
It("podman images filter before image", func() {
if podmanTest.RemoteTest {
Skip("Does not work on remote client")