Update tests for a c/common error message change

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
Miloslav Trmač 2023-11-08 19:21:52 +01:00
parent ced07a55f4
commit a3d5814e0e
5 changed files with 8 additions and 8 deletions

View File

@ -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" \

View File

@ -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()

View File

@ -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() {

View File

@ -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")

View File

@ -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" {