mirror of https://github.com/containers/podman.git
Update tests for a c/common error message change
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
ced07a55f4
commit
a3d5814e0e
|
@ -159,8 +159,8 @@ errmsg "no contents in .*" \
|
||||||
"Error: context must be a directory: .*" \
|
"Error: context must be a directory: .*" \
|
||||||
"bud with specified context should fail if context contains empty Dockerfile"
|
"bud with specified context should fail if context contains empty Dockerfile"
|
||||||
|
|
||||||
errmsg "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: checking authfile: 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"
|
"bud with Containerfile should fail with nonexistent authfile"
|
||||||
|
|
||||||
errmsg "cannot find Containerfile or Dockerfile" \
|
errmsg "cannot find Containerfile or Dockerfile" \
|
||||||
|
|
|
@ -168,7 +168,7 @@ var _ = Describe("Podman login and logout", func() {
|
||||||
session = podmanTest.Podman([]string{"push", "-q", "--authfile", "/tmp/nonexistent", ALPINE, testImg})
|
session = podmanTest.Podman([]string{"push", "-q", "--authfile", "/tmp/nonexistent", ALPINE, testImg})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).To(ExitWithError())
|
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 = podmanTest.Podman([]string{"push", "-q", "--authfile", authFile, ALPINE, testImg})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
|
@ -182,7 +182,7 @@ var _ = Describe("Podman login and logout", func() {
|
||||||
session = podmanTest.Podman([]string{"logout", "--authfile", "/tmp/nonexistent", server})
|
session = podmanTest.Podman([]string{"logout", "--authfile", "/tmp/nonexistent", server})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).To(ExitWithError())
|
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 = podmanTest.Podman([]string{"logout", "--authfile", authFile, server})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
|
|
|
@ -172,7 +172,7 @@ var _ = Describe("Podman pull", func() {
|
||||||
session := podmanTest.Podman([]string{"pull", "-q", "--authfile", "/tmp/nonexistent", ALPINE})
|
session := podmanTest.Podman([]string{"pull", "-q", "--authfile", "/tmp/nonexistent", ALPINE})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).To(ExitWithError())
|
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() {
|
It("podman pull by digest (image list)", func() {
|
||||||
|
|
|
@ -1297,12 +1297,12 @@ search | $IMAGE |
|
||||||
if [[ "$args" = "''" ]]; then args=;fi
|
if [[ "$args" = "''" ]]; then args=;fi
|
||||||
|
|
||||||
run_podman 125 $command --authfile=$bogus $args
|
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"
|
"$command --authfile=nonexistent-path"
|
||||||
|
|
||||||
if [[ "$command" != "logout" ]]; then
|
if [[ "$command" != "logout" ]]; then
|
||||||
REGISTRY_AUTH_FILE=$bogus run_podman ? $command $args
|
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"
|
"$command REGISTRY_AUTH_FILE=nonexistent-path"
|
||||||
fi
|
fi
|
||||||
done < <(parse_table "$tests")
|
done < <(parse_table "$tests")
|
||||||
|
|
|
@ -756,7 +756,7 @@ spec:
|
||||||
bogus=$PODMAN_TMPDIR/bogus-authfile
|
bogus=$PODMAN_TMPDIR/bogus-authfile
|
||||||
|
|
||||||
run_podman 125 kube play --authfile=$bogus - < $PODMAN_TMPDIR/test.yaml
|
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" {
|
@test "podman kube play with umask from containers.conf" {
|
||||||
|
|
Loading…
Reference in New Issue