summaryrefslogtreecommitdiff
path: root/test/e2e/search_test.go
diff options
context:
space:
mode:
authorUrvashi Mohnani <umohnani@redhat.com>2018-09-11 16:37:43 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-09-13 16:20:40 +0000
commit70b160ae032b548b3d4456f17f8436b24ea37a15 (patch)
treec9fd9529573742180ca9d582fe68349d04ca96f3 /test/e2e/search_test.go
parent9bc3c9d11cb112410e963b73a4d0dfe3742d27cf (diff)
downloadpodman-70b160ae032b548b3d4456f17f8436b24ea37a15.tar.gz
podman-70b160ae032b548b3d4456f17f8436b24ea37a15.tar.bz2
podman-70b160ae032b548b3d4456f17f8436b24ea37a15.zip
Search registries with an empty query
Adds functionality to search registries implementing the v2 endpoint with an empty query, that is the results will be all the available images on the registries. If this is tried with a v1 registry an error will occur. To search a whole registry, there needs to be a trailing slash at the end, i.e `podman search registry.fedoraproject.org/`. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com> Closes: #1444 Approved by: rhatdan
Diffstat (limited to 'test/e2e/search_test.go')
-rw-r--r--test/e2e/search_test.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/e2e/search_test.go b/test/e2e/search_test.go
index 7b9612a35..2c85ca765 100644
--- a/test/e2e/search_test.go
+++ b/test/e2e/search_test.go
@@ -84,7 +84,7 @@ var _ = Describe("Podman search", func() {
})
It("podman search limit flag", func() {
- search := podmanTest.Podman([]string{"search", "--limit", "3", "alpine"})
+ search := podmanTest.Podman([]string{"search", "--limit", "3", "docker.io/alpine"})
search.WaitWithDefaultTimeout()
Expect(search.ExitCode()).To(Equal(0))
Expect(len(search.OutputToStringArray())).To(Equal(4))
@@ -120,6 +120,13 @@ var _ = Describe("Podman search", func() {
}
})
+ It("podman search v2 registry with empty query", func() {
+ search := podmanTest.Podman([]string{"search", "registry.fedoraproject.org/"})
+ search.WaitWithDefaultTimeout()
+ Expect(search.ExitCode()).To(Equal(0))
+ Expect(len(search.OutputToStringArray())).To(BeNumerically(">=", 1))
+ })
+
It("podman search attempts HTTP if tls-verify flag is set false", func() {
podmanTest.RestoreArtifact(registry)
fakereg := podmanTest.Podman([]string{"run", "-d", "--name", "registry", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"})