mirror of
https://github.com/containers/podman.git
synced 2025-06-23 10:38:20 +08:00
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
This commit is contained in:

committed by
Atomic Bot

parent
9bc3c9d11c
commit
70b160ae03
@ -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"})
|
||||
|
Reference in New Issue
Block a user