Skip to content

Commit

Permalink
test/e2e/search_test.go - relax tests
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
vrothberg committed Sep 9, 2021
1 parent 78c5a47 commit e5468d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/e2e/search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand All @@ -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))
})
})

0 comments on commit e5468d4

Please sign in to comment.