diff options
Diffstat (limited to 'test/e2e/create_test.go')
-rw-r--r-- | test/e2e/create_test.go | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go index 96a234446..d9378abca 100644 --- a/test/e2e/create_test.go +++ b/test/e2e/create_test.go @@ -271,11 +271,11 @@ var _ = Describe("Podman create", func() { }) It("podman create --pull", func() { - session := podmanTest.PodmanNoCache([]string{"create", "--pull", "never", "--name=foo", "debian"}) + session := podmanTest.PodmanNoCache([]string{"create", "--pull", "never", "--name=foo", "testimage:00000000"}) session.WaitWithDefaultTimeout() Expect(session).To(ExitWithError()) - session = podmanTest.PodmanNoCache([]string{"create", "--pull", "always", "--name=foo", "debian"}) + session = podmanTest.PodmanNoCache([]string{"create", "--pull", "always", "--name=foo", "testimage:00000000"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) }) @@ -626,4 +626,22 @@ var _ = Describe("Podman create", func() { session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(BeZero()) }) + + It("podman create -d should fail, can not detach create containers", func() { + session := podmanTest.Podman([]string{"create", "-d", ALPINE}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(125)) + Expect(session.ErrorToString()).To(ContainSubstring("unknown shorthand flag")) + + session = podmanTest.Podman([]string{"create", "--detach", ALPINE}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(125)) + Expect(session.ErrorToString()).To(ContainSubstring("unknown flag")) + + session = podmanTest.Podman([]string{"create", "--detach-keys", "ctrl-x", ALPINE}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(125)) + Expect(session.ErrorToString()).To(ContainSubstring("unknown flag")) + }) + }) |