From d7c0f968ca60994306c8c76cd8e4e0a677fe9ada Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Fri, 25 Oct 2019 21:16:37 -0400 Subject: fix bug check nonexist authfile Use GetDefaultAuthFile() from buildah. For podman command(except login), if authfile does not exist returns error. close #4328 Signed-off-by: Qi Wang --- test/e2e/run_test.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/e2e/run_test.go') diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index 874aa498e..7fc85c9ce 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -992,4 +992,11 @@ USER mail` session.WaitWithDefaultTimeout() Expect(session).To(ExitWithError()) }) + + It("podman run should fail with nonexist authfile", func() { + SkipIfRemote() + session := podmanTest.Podman([]string{"run", "--authfile", "/tmp/nonexist", ALPINE, "ls"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Not(Equal(0))) + }) }) -- cgit v1.2.3-54-g00ecf