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/create_test.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/e2e/create_test.go') diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go index f5dca321c..7d977f4e3 100644 --- a/test/e2e/create_test.go +++ b/test/e2e/create_test.go @@ -297,4 +297,11 @@ var _ = Describe("Podman create", func() { Expect(session.ExitCode()).To((Equal(0))) Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST)) }) + + It("podman create --authfile with nonexist authfile", func() { + SkipIfRemote() + session := podmanTest.PodmanNoCache([]string{"create", "--authfile", "/tmp/nonexist", "--name=foo", ALPINE}) + session.WaitWithDefaultTimeout() + Expect(session).To(Not(Equal(0))) + }) }) -- cgit v1.2.3-54-g00ecf