From a3d5814e0eddc37b59482fbec250ec6774e8bf9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Wed, 8 Nov 2023 19:21:52 +0100 Subject: [PATCH] Update tests for a c/common error message change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miloslav Trmač --- test/buildah-bud/apply-podman-deltas | 4 ++-- test/e2e/login_logout_test.go | 4 ++-- test/e2e/pull_test.go | 2 +- test/system/030-run.bats | 4 ++-- test/system/700-play.bats | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/buildah-bud/apply-podman-deltas b/test/buildah-bud/apply-podman-deltas index 20517067d7..53e5a8caea 100755 --- a/test/buildah-bud/apply-podman-deltas +++ b/test/buildah-bud/apply-podman-deltas @@ -159,8 +159,8 @@ errmsg "no contents in .*" \ "Error: context must be a directory: .*" \ "bud with specified context should fail if context contains empty Dockerfile" -errmsg "checking authfile: stat /tmp/nonexistent: no such file or directory" \ - "Error: checking authfile: stat /tmp/nonexistent: no such file or directory" \ +errmsg "credential file is not accessible: stat /tmp/nonexistent: no such file or directory" \ + "Error: credential file is not accessible: stat /tmp/nonexistent: no such file or directory" \ "bud with Containerfile should fail with nonexistent authfile" errmsg "cannot find Containerfile or Dockerfile" \ diff --git a/test/e2e/login_logout_test.go b/test/e2e/login_logout_test.go index 38a076d8c8..a5ebb4a138 100644 --- a/test/e2e/login_logout_test.go +++ b/test/e2e/login_logout_test.go @@ -168,7 +168,7 @@ var _ = Describe("Podman login and logout", func() { session = podmanTest.Podman([]string{"push", "-q", "--authfile", "/tmp/nonexistent", ALPINE, testImg}) session.WaitWithDefaultTimeout() Expect(session).To(ExitWithError()) - Expect(session.ErrorToString()).To(Equal("Error: checking authfile: stat /tmp/nonexistent: no such file or directory")) + Expect(session.ErrorToString()).To(Equal("Error: credential file is not accessible: stat /tmp/nonexistent: no such file or directory")) session = podmanTest.Podman([]string{"push", "-q", "--authfile", authFile, ALPINE, testImg}) session.WaitWithDefaultTimeout() @@ -182,7 +182,7 @@ var _ = Describe("Podman login and logout", func() { session = podmanTest.Podman([]string{"logout", "--authfile", "/tmp/nonexistent", server}) session.WaitWithDefaultTimeout() Expect(session).To(ExitWithError()) - Expect(session.ErrorToString()).To(Equal("Error: checking authfile: stat /tmp/nonexistent: no such file or directory")) + Expect(session.ErrorToString()).To(Equal("Error: credential file is not accessible: stat /tmp/nonexistent: no such file or directory")) session = podmanTest.Podman([]string{"logout", "--authfile", authFile, server}) session.WaitWithDefaultTimeout() diff --git a/test/e2e/pull_test.go b/test/e2e/pull_test.go index 0fea12229e..9a3b5f049f 100644 --- a/test/e2e/pull_test.go +++ b/test/e2e/pull_test.go @@ -172,7 +172,7 @@ var _ = Describe("Podman pull", func() { session := podmanTest.Podman([]string{"pull", "-q", "--authfile", "/tmp/nonexistent", ALPINE}) session.WaitWithDefaultTimeout() Expect(session).To(ExitWithError()) - Expect(session.ErrorToString()).To(Equal("Error: checking authfile: stat /tmp/nonexistent: no such file or directory")) + Expect(session.ErrorToString()).To(Equal("Error: credential file is not accessible: stat /tmp/nonexistent: no such file or directory")) }) It("podman pull by digest (image list)", func() { diff --git a/test/system/030-run.bats b/test/system/030-run.bats index 2a1cdcf9ce..ab2abfa37b 100644 --- a/test/system/030-run.bats +++ b/test/system/030-run.bats @@ -1297,12 +1297,12 @@ search | $IMAGE | if [[ "$args" = "''" ]]; then args=;fi run_podman 125 $command --authfile=$bogus $args - assert "$output" = "Error: checking authfile: stat $bogus: no such file or directory" \ + assert "$output" = "Error: credential file is not accessible: stat $bogus: no such file or directory" \ "$command --authfile=nonexistent-path" if [[ "$command" != "logout" ]]; then REGISTRY_AUTH_FILE=$bogus run_podman ? $command $args - assert "$output" !~ "checking authfile" \ + assert "$output" !~ "credential file is not accessible" \ "$command REGISTRY_AUTH_FILE=nonexistent-path" fi done < <(parse_table "$tests") diff --git a/test/system/700-play.bats b/test/system/700-play.bats index b64007acbc..f58ebe7297 100644 --- a/test/system/700-play.bats +++ b/test/system/700-play.bats @@ -756,7 +756,7 @@ spec: bogus=$PODMAN_TMPDIR/bogus-authfile run_podman 125 kube play --authfile=$bogus - < $PODMAN_TMPDIR/test.yaml - is "$output" "Error: checking authfile: stat $bogus: no such file or directory" "$command should fail with not such file" + is "$output" "Error: credential file is not accessible: stat $bogus: no such file or directory" "$command should fail with not such file" } @test "podman kube play with umask from containers.conf" {