diff options
Diffstat (limited to 'test/e2e/login_logout_test.go')
-rw-r--r-- | test/e2e/login_logout_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/e2e/login_logout_test.go b/test/e2e/login_logout_test.go index 14cfed5db..c3df10f5e 100644 --- a/test/e2e/login_logout_test.go +++ b/test/e2e/login_logout_test.go @@ -123,6 +123,11 @@ var _ = Describe("Podman login and logout", func() { json.Unmarshal(authInfo, &info) fmt.Println(info) + // push should fail with nonexist authfile + session = podmanTest.Podman([]string{"push", "--authfile", "/tmp/nonexist", ALPINE, testImg}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Not(Equal(0))) + session = podmanTest.Podman([]string{"push", "--authfile", authFile, ALPINE, testImg}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) @@ -131,6 +136,11 @@ var _ = Describe("Podman login and logout", func() { session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) + // logout should fail with nonexist authfile + session = podmanTest.Podman([]string{"logout", "--authfile", "/tmp/nonexist", server}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Not(Equal(0))) + session = podmanTest.Podman([]string{"logout", "--authfile", authFile, server}) }) |