summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorQi Wang <qiwan@redhat.com>2020-09-29 16:40:10 -0400
committerQi Wang <qiwan@redhat.com>2020-10-09 11:49:46 -0400
commit66798e993a1d3c111f15a85242cac1427c39f53e (patch)
treeead22c734350fa97d4fc1d611d1934be233f3c59 /test
parent73488369586d387db0e4754fa56d5d0077a24940 (diff)
downloadpodman-66798e993a1d3c111f15a85242cac1427c39f53e.tar.gz
podman-66798e993a1d3c111f15a85242cac1427c39f53e.tar.bz2
podman-66798e993a1d3c111f15a85242cac1427c39f53e.zip
Search repository tags using --list-tags
For fix of BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1684263 Add --list-tags to podman search to return a table the repository tags. Signed-off-by: Qi Wang <qiwan@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/search_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/e2e/search_test.go b/test/e2e/search_test.go
index 043da9059..0cf005529 100644
--- a/test/e2e/search_test.go
+++ b/test/e2e/search_test.go
@@ -423,4 +423,24 @@ registries = ['{{.Host}}:{{.Port}}']`
Expect(search.ExitCode()).To(Equal(0))
Expect(len(search.OutputToStringArray()) > 1).To(BeTrue())
})
+
+ It("podman search repository tags", func() {
+ search := podmanTest.Podman([]string{"search", "--list-tags", "--limit", "30", "docker.io/library/alpine"})
+ search.WaitWithDefaultTimeout()
+ Expect(search.ExitCode()).To(Equal(0))
+ Expect(len(search.OutputToStringArray())).To(Equal(31))
+
+ search = podmanTest.Podman([]string{"search", "--list-tags", "docker.io/library/alpine"})
+ search.WaitWithDefaultTimeout()
+ Expect(search.ExitCode()).To(Equal(0))
+ Expect(len(search.OutputToStringArray()) > 2).To(BeTrue())
+
+ search = podmanTest.Podman([]string{"search", "--filter=is-official", "--list-tags", "docker.io/library/alpine"})
+ search.WaitWithDefaultTimeout()
+ Expect(search.ExitCode()).To(Not(Equal(0)))
+
+ search = podmanTest.Podman([]string{"search", "--list-tags", "docker.io/library/"})
+ search.WaitWithDefaultTimeout()
+ Expect(len(search.OutputToStringArray()) == 0).To(BeTrue())
+ })
})