summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-09-09 15:53:59 +0200
committerValentin Rothberg <rothberg@redhat.com>2021-09-09 16:02:40 +0200
commite5468d404c77379cb8d2fd0c5fad80da976725eb (patch)
treef287e5d6467ff94f862b54ce62e8813700105c9e
parent78c5a47fc9443f60d8bc75aff40dbdb4d9d32dc6 (diff)
downloadpodman-e5468d404c77379cb8d2fd0c5fad80da976725eb.tar.gz
podman-e5468d404c77379cb8d2fd0c5fad80da976725eb.tar.bz2
podman-e5468d404c77379cb8d2fd0c5fad80da976725eb.zip
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 <rothberg@redhat.com>
-rw-r--r--test/e2e/search_test.go6
1 files 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))
})
})