From bb03d352892a91ecd6e7112c8de372165767e639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Thu, 28 Nov 2024 23:25:42 +0100 Subject: [PATCH] Update expected errors when pulling encrypted images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/containers/image/issues/2646 will track actually returning a meaningful error instead of these internal details. Signed-off-by: Miloslav Trmač --- test/e2e/pull_test.go | 2 +- test/e2e/run_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/pull_test.go b/test/e2e/pull_test.go index ccc508df42..7a3995ecfe 100644 --- a/test/e2e/pull_test.go +++ b/test/e2e/pull_test.go @@ -624,7 +624,7 @@ 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, "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..6717c014c6 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(ContainSubstring("does not match config's DiffID")) // With session = podmanTest.Podman([]string{"run", "--tls-verify=false", "--decryption-key", privateKeyFileName, imgPath})