diff --git a/test/e2e/pull_test.go b/test/e2e/pull_test.go index ccc508df42..34930c03ce 100644 --- a/test/e2e/pull_test.go +++ b/test/e2e/pull_test.go @@ -624,7 +624,8 @@ var _ = Describe("Podman pull", func() { // Pulling encrypted image without key should fail session = podmanTest.Podman([]string{"pull", "--tls-verify=false", imgPath}) session.WaitWithDefaultTimeout() - Expect(session).Should(ExitWithError(125, "invalid tar header")) + Expect(session).Should(ExitWithError(125, " ")) // " ", not "" - stderr can be not empty, and we will match actual contents below. + Expect(session.ErrorToString()).To(Or(ContainSubstring("invalid tar header"), ContainSubstring("does not match config's DiffID"))) // Pulling encrypted image with wrong key should fail session = podmanTest.Podman([]string{"pull", "-q", "--decryption-key", wrongPrivateKeyFileName, "--tls-verify=false", imgPath}) diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index ee7147feaf..149449c82d 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -2325,7 +2325,7 @@ WORKDIR /madethis`, BB) session = podmanTest.Podman([]string{"run", "--tls-verify=false", imgPath}) session.WaitWithDefaultTimeout() Expect(session).Should(ExitWithError(125, "Trying to pull "+imgPath)) - Expect(session.ErrorToString()).To(ContainSubstring("invalid tar header")) + Expect(session.ErrorToString()).To(Or(ContainSubstring("invalid tar header"), ContainSubstring("does not match config's DiffID"))) // With session = podmanTest.Podman([]string{"run", "--tls-verify=false", "--decryption-key", privateKeyFileName, imgPath})