From e5468d404c77379cb8d2fd0c5fad80da976725eb Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Thu, 9 Sep 2021 15:53:59 +0200 Subject: test/e2e/search_test.go - relax tests Some search tests were looking for an explicit amount of images to match. Since images are moving targets on these registries, make sure to use lower bounds instead of exact matches. Fixes CI which started to break when Red Hat images changed. Signed-off-by: Valentin Rothberg --- test/e2e/search_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/search_test.go b/test/e2e/search_test.go index b0faabf6c..f82c3d9d1 100644 --- a/test/e2e/search_test.go +++ b/test/e2e/search_test.go @@ -148,7 +148,7 @@ registries = ['{{.Host}}:{{.Port}}']` search := podmanTest.Podman([]string{"search", "docker.io/alpine"}) search.WaitWithDefaultTimeout() Expect(search).Should(Exit(0)) - Expect(len(search.OutputToStringArray())).To(Equal(26)) + Expect(len(search.OutputToStringArray())).To(BeNumerically(">", 10)) search = podmanTest.Podman([]string{"search", "--limit", "3", "docker.io/alpine"}) search.WaitWithDefaultTimeout() @@ -462,7 +462,7 @@ registries = ['{{.Host}}:{{.Port}}']` search = podmanTest.Podman([]string{"search", "--list-tags", "docker.io/library/alpine"}) search.WaitWithDefaultTimeout() Expect(search).Should(Exit(0)) - Expect(len(search.OutputToStringArray()) > 2).To(BeTrue()) + Expect(len(search.OutputToStringArray())).To(BeNumerically(">", 2)) search = podmanTest.Podman([]string{"search", "--filter=is-official", "--list-tags", "docker.io/library/alpine"}) search.WaitWithDefaultTimeout() @@ -477,6 +477,6 @@ registries = ['{{.Host}}:{{.Port}}']` search := podmanTest.Podman([]string{"search", "--limit", "130", "registry.redhat.io/rhel"}) search.WaitWithDefaultTimeout() Expect(search).Should(Exit(0)) - Expect(len(search.OutputToStringArray())).To(Equal(131)) + Expect(len(search.OutputToStringArray())).To(BeNumerically("<=", 131)) }) }) -- cgit v1.2.3-54-g00ecf