From 318336ad4bdfe8bda531f9f580d8077e19a0e993 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Mon, 17 Aug 2020 07:34:02 -0600 Subject: flake fix: podman image trust 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 --- test/e2e/trust_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/e2e/trust_test.go b/test/e2e/trust_test.go index ecdf27a2e..82b0f9f26 100644 --- a/test/e2e/trust_test.go +++ b/test/e2e/trust_test.go @@ -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() { -- cgit v1.2.3-54-g00ecf