Skip to content

Commit

Permalink
flake fix: podman image trust
Browse files Browse the repository at this point in the history
The output of 'podman image trust' is in random order; but
its e2e test was assuming a specific one. This caused flakes.

Fixes: #6764

Signed-off-by: Ed Santiago <santiago@redhat.com>
  • Loading branch information
edsantiago committed Aug 18, 2020
1 parent 748e882 commit 318336a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/e2e/trust_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,12 @@ var _ = Describe("Podman trust", func() {
Expect(session.ExitCode()).To(Equal(0))
outArray := session.OutputToStringArray()
Expect(len(outArray)).To(Equal(3))
Expect(outArray[0]).Should(ContainSubstring("accept"))
Expect(outArray[1]).Should(ContainSubstring("reject"))
Expect(outArray[2]).Should(ContainSubstring("signed"))

// image order is not guaranteed. All we can do is check that
// these strings appear in output, we can't cross-check them.
Expect(session.OutputToString()).To(ContainSubstring("accept"))
Expect(session.OutputToString()).To(ContainSubstring("reject"))
Expect(session.OutputToString()).To(ContainSubstring("signed"))
})

It("podman image trust set", func() {
Expand Down

0 comments on commit 318336a

Please sign in to comment.