summaryrefslogtreecommitdiff
path: root/test/e2e/start_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-12-11 21:54:55 -0500
committerGitHub <noreply@github.com>2020-12-11 21:54:55 -0500
commitfbcd44567c70e1da78a25f077bbc7cae3dd88081 (patch)
tree18508b20699ab422f4ae7dd6cedcac5667ac45bc /test/e2e/start_test.go
parentb0a287ce46ee8326d25efc1e3b9d690eb1e1bbab (diff)
parent098e0a78856a1cc3b642300dc39f23b93e1f74a8 (diff)
downloadpodman-fbcd44567c70e1da78a25f077bbc7cae3dd88081.tar.gz
podman-fbcd44567c70e1da78a25f077bbc7cae3dd88081.tar.bz2
podman-fbcd44567c70e1da78a25f077bbc7cae3dd88081.zip
Merge pull request #8688 from rhatdan/start
Handle --rm when starting a container
Diffstat (limited to 'test/e2e/start_test.go')
-rw-r--r--test/e2e/start_test.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/e2e/start_test.go b/test/e2e/start_test.go
index 942e00123..a6f22e007 100644
--- a/test/e2e/start_test.go
+++ b/test/e2e/start_test.go
@@ -49,6 +49,29 @@ var _ = Describe("Podman start", func() {
Expect(session.ExitCode()).To(Equal(0))
})
+ It("podman start --rm removed on failure", func() {
+ session := podmanTest.Podman([]string{"create", "--name=test", "--rm", ALPINE, "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ session = podmanTest.Podman([]string{"start", "test"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(125))
+ session = podmanTest.Podman([]string{"container", "exists", "test"})
+ Expect(session.ExitCode()).To(Not(Equal(0)))
+ })
+
+ It("podman start --rm --attach removed on failure", func() {
+ session := podmanTest.Podman([]string{"create", "--rm", ALPINE, "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ cid := session.OutputToString()
+ session = podmanTest.Podman([]string{"start", "--attach", cid})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(125))
+ session = podmanTest.Podman([]string{"container", "exists", cid})
+ Expect(session.ExitCode()).To(Not(Equal(0)))
+ })
+
It("podman container start single container by id", func() {
session := podmanTest.Podman([]string{"container", "create", ALPINE, "ls"})
session.WaitWithDefaultTimeout()