summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-02-14 15:25:06 -0600
committerAtomic Bot <atomic-devel@projectatomic.io>2018-02-15 00:48:13 +0000
commite814936915d28286fa88f1211bc354687a358a7c (patch)
treeab08bd2f109f9ff9baa2bc7c8e0f65c7f94113af /test/e2e
parentbe9ed1cfacc19d1ad3c09e10481da445615b8b8e (diff)
downloadpodman-e814936915d28286fa88f1211bc354687a358a7c.tar.gz
podman-e814936915d28286fa88f1211bc354687a358a7c.tar.bz2
podman-e814936915d28286fa88f1211bc354687a358a7c.zip
No entrpoint, cmd, or command
When an image does not have an ENTRYPOINT nor a CMD and the user does not provide a command in the CLI, we should fail gracefully. This resolves issue #328 Signed-off-by: baude <bbaude@redhat.com> Closes: #333 Approved by: mheon
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/run_entrypoint_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/e2e/run_entrypoint_test.go b/test/e2e/run_entrypoint_test.go
index 2ae282967..e06f8bb3a 100644
--- a/test/e2e/run_entrypoint_test.go
+++ b/test/e2e/run_entrypoint_test.go
@@ -28,6 +28,17 @@ var _ = Describe("Podman run entrypoint", func() {
})
+ It("podman run no command, entrypoint, or cmd", func() {
+ dockerfile := `FROM docker.io/library/alpine:latest
+ENTRYPOINT []
+CMD []
+`
+ podmanTest.BuildImage(dockerfile, "foobar.com/entrypoint:latest")
+ session := podmanTest.Podman([]string{"run", "foobar.com/entrypoint:latest"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(125))
+ })
+
It("podman run entrypoint", func() {
dockerfile := `FROM docker.io/library/alpine:latest
ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]