Skip to content

Commit

Permalink
Merge pull request #5284 from edsantiago/flaky_fedora_registry
Browse files Browse the repository at this point in the history
search test on fedora registry: retry 5 times
  • Loading branch information
openshift-merge-robot authored Feb 20, 2020
2 parents a7a52fd + bb31d35 commit a8896d5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions test/e2e/search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"os"
"strconv"
"text/template"
"time"

. "github.com/containers/libpod/test/utils"
. "github.com/onsi/ginkgo"
Expand Down Expand Up @@ -165,8 +166,16 @@ registries = ['{{.Host}}:{{.Port}}']`
})

It("podman search v2 registry with empty query", func() {
search := podmanTest.Podman([]string{"search", "registry.fedoraproject.org/"})
search.WaitWithDefaultTimeout()
var search *PodmanSessionIntegration
for i := 0; i < 5; i++ {
search = podmanTest.Podman([]string{"search", "registry.fedoraproject.org/"})
search.WaitWithDefaultTimeout()
if search.ExitCode() == 0 {
break
}
fmt.Println("Search failed; sleeping & retrying...")
time.Sleep(2 * time.Second)
}
Expect(search.ExitCode()).To(Equal(0))
Expect(len(search.OutputToStringArray())).To(BeNumerically(">=", 1))
})
Expand Down

0 comments on commit a8896d5

Please sign in to comment.