Skip to content

Commit

Permalink
e2e: add ginkgo decorators to address flakes
Browse files Browse the repository at this point in the history
- trust_test: adding 'Ordered' seems to resolve a very common
  flake. I've tested this for dozens of CI runs, and haven't
  seen the flake recur (normally it fails every few runs).

- exec and search tests: add FlakeAttempts(3). This is a NOP
  under our current CI setup, in which we run ginkgo with
  a global --flake-attempts=3. I am submitting this as an
  optimistic step toward a no-flake-attempts world (containers#17967)

Fixes: containers#18358

Signed-off-by: Ed Santiago <[email protected]>
  • Loading branch information
edsantiago committed Jun 7, 2023
1 parent 82caa10 commit b65ba90
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion test/e2e/exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ var _ = Describe("Podman exec", func() {
Expect(session.OutputToString()).To(ContainSubstring("0000000000000000"))
})

It("podman exec terminal doesn't hang", func() {
// #10927 ("no logs from conmon"), one of our nastiest flakes
It("podman exec terminal doesn't hang", FlakeAttempts(3), func() {
setup := podmanTest.Podman([]string{"run", "-dti", "--name", "test1", fedoraMinimal, "sleep", "+Inf"})
setup.WaitWithDefaultTimeout()
Expect(setup).Should(Exit(0))
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,8 @@ registries = ['{{.Host}}:{{.Port}}']`
Expect(search).To(ExitWithError())
})

It("podman search with wildcards", func() {
// Registry is unreliable (#18484), this is another super-common flake
It("podman search with wildcards", FlakeAttempts(3), func() {
search := podmanTest.Podman([]string{"search", "registry.access.redhat.com/*openshift*"})
search.WaitWithDefaultTimeout()
Expect(search).Should(Exit(0))
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/trust_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import (
. "github.com/onsi/gomega/gexec"
)

var _ = Describe("Podman trust", func() {
// Without Ordered, tests flake with "Getting key identity" (#18358)
var _ = Describe("Podman trust", Ordered, func() {

BeforeEach(func() {
SkipIfRemote("podman-remote does not support image trust")
Expand Down

0 comments on commit b65ba90

Please sign in to comment.