diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-06-16 14:06:55 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-06-19 14:47:36 +0200 |
commit | b05888a97dbb45a205ff535538ecdd91a19c6ae3 (patch) | |
tree | 7fdfa0188f2d7c27029deb50097a71b17d3b744b /test/e2e/search_test.go | |
parent | 5ec29f8d4e79500915ec79824d9eb21630205f3f (diff) | |
download | podman-b05888a97dbb45a205ff535538ecdd91a19c6ae3.tar.gz podman-b05888a97dbb45a205ff535538ecdd91a19c6ae3.tar.bz2 podman-b05888a97dbb45a205ff535538ecdd91a19c6ae3.zip |
search: allow wildcards
Allow wildcards in the search term. Note that not all registries
support wildcards and it may only work with v1 registries.
Note that searching implies figuring out if the specified search term
includes a registry. If there's not registry detected, the search term
will be used against all configured "unqualified-serach-registries" in
the registries.conf. The parsing logic considers a registry to be the
substring before the first slash `/`.
With these changes we now not only support wildcards but arbitrary
input; ultimately it's up to the registries to decide whether they
support given input or not.
Fixes: bugzilla.redhat.com/show_bug.cgi?id=1846629
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'test/e2e/search_test.go')
-rw-r--r-- | test/e2e/search_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/e2e/search_test.go b/test/e2e/search_test.go index 9ba0241fe..4e37f7d7a 100644 --- a/test/e2e/search_test.go +++ b/test/e2e/search_test.go @@ -400,4 +400,16 @@ registries = ['{{.Host}}:{{.Port}}']` search.WaitWithDefaultTimeout() Expect(search.ExitCode()).To(Not(Equal(0))) }) + + It("podman search with wildcards", func() { + search := podmanTest.Podman([]string{"search", "--limit", "30", "registry.redhat.io/*"}) + search.WaitWithDefaultTimeout() + Expect(search.ExitCode()).To(Equal(0)) + Expect(len(search.OutputToStringArray())).To(Equal(31)) + + search = podmanTest.Podman([]string{"search", "registry.redhat.io/*openshift*"}) + search.WaitWithDefaultTimeout() + Expect(search.ExitCode()).To(Equal(0)) + Expect(len(search.OutputToStringArray()) > 1).To(BeTrue()) + }) }) |