summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-08-27 11:22:28 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-28 14:29:12 +0000
commit1a90b2fd363bec5f9b57c1cd829ceb5890270f8c (patch)
tree7a043c8e78f02dc7ca5946a6670e1045c2e6c9f9 /test/e2e
parent9e315518aa52c8cb80b2fae3bd48f6e52e6d0fc0 (diff)
downloadpodman-1a90b2fd363bec5f9b57c1cd829ceb5890270f8c.tar.gz
podman-1a90b2fd363bec5f9b57c1cd829ceb5890270f8c.tar.bz2
podman-1a90b2fd363bec5f9b57c1cd829ceb5890270f8c.zip
allow specification of entrypoint in the form of a slice
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #1352 Approved by: mheon
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/create_test.go37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go
index cdcf1e8c6..c36a8e31f 100644
--- a/test/e2e/create_test.go
+++ b/test/e2e/create_test.go
@@ -72,4 +72,41 @@ var _ = Describe("Podman create", func() {
Expect(ok).To(BeTrue())
Expect(value).To(Equal("WORLD"))
})
+
+ It("podman create --entrypoint command", func() {
+ session := podmanTest.Podman([]string{"create", "--entrypoint", "/bin/foobar", ALPINE})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(podmanTest.NumberOfContainers()).To(Equal(1))
+
+ result := podmanTest.Podman([]string{"inspect", "-l", "--format", "{{.Config.Entrypoint}}"})
+ result.WaitWithDefaultTimeout()
+ Expect(result.ExitCode()).To(Equal(0))
+ Expect(result.OutputToString()).To(Equal("/bin/foobar"))
+ })
+
+ It("podman create --entrypoint \"\"", func() {
+ session := podmanTest.Podman([]string{"create", "--entrypoint", "", ALPINE, "ls"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(podmanTest.NumberOfContainers()).To(Equal(1))
+
+ result := podmanTest.Podman([]string{"inspect", "-l", "--format", "{{.Config.Entrypoint}}"})
+ result.WaitWithDefaultTimeout()
+ Expect(result.ExitCode()).To(Equal(0))
+ Expect(result.OutputToString()).To(Equal(""))
+ })
+
+ It("podman create --entrypoint json", func() {
+ jsonString := `[ "/bin/foo", "-c"]`
+ session := podmanTest.Podman([]string{"create", "--entrypoint", jsonString, ALPINE})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(podmanTest.NumberOfContainers()).To(Equal(1))
+
+ result := podmanTest.Podman([]string{"inspect", "-l", "--format", "{{.Config.Entrypoint}}"})
+ result.WaitWithDefaultTimeout()
+ Expect(result.ExitCode()).To(Equal(0))
+ Expect(result.OutputToString()).To(Equal("/bin/foo -c"))
+ })
})