summaryrefslogtreecommitdiff
path: root/test/e2e/stop_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/stop_test.go')
-rw-r--r--test/e2e/stop_test.go36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/e2e/stop_test.go b/test/e2e/stop_test.go
index 97c9287b9..61c3fedfd 100644
--- a/test/e2e/stop_test.go
+++ b/test/e2e/stop_test.go
@@ -141,4 +141,40 @@ var _ = Describe("Podman stop", func() {
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
})
+
+ It("podman stop all containers with one stopped", func() {
+ session := podmanTest.RunTopContainer("test1")
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ session2 := podmanTest.RunTopContainer("test1")
+ session2.WaitWithDefaultTimeout()
+ Expect(session2.ExitCode()).To(Equal(0))
+ session3 := podmanTest.Podman([]string("stop", "-l", "-t", "1"))
+ session3.WaitWithDefaultTimeout()
+ Expect(session3.ExitCode()).To(Equal(0))
+ session4 := podmanTest.Podman([]string("stop", "-a", "-t", "1"))
+ session4.WaitWithDefaultTimeout()
+ Expect(session4.ExitCode()).To(Equal(0))
+ finalCtrs := podmanTest.Podman([]string("ps", "-q"))
+ finalCtrs.WaitWithDefaultTimeout()
+ Expect(finalCtrs.ExitCode()).To(Equal(0))
+ Expect(finalCtrs.OutputToString()).To(Equal(""))
+ })
+
+ It("podman stop all containers with one created", func() {
+ session := podmanTest.RunTopContainer("test1")
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ session2 := podmanTest.Podman([]string{"create", ALPINE, "/bin/sh"})
+ session2.WaitWithDefaultTimeout()
+ Expect(session2.ExitCode()).To(Equal(0))
+ session3 := podmanTest.Podman([]string("stop", "-a", "-t", "1"))
+ session3.WaitWithDefaultTimeout()
+ Expect(session3.ExitCode()).To(Equal(0))
+ finalCtrs := podmanTest.Podman([]string("ps", "-q"))
+ finalCtrs.WaitWithDefaultTimeout()
+ Expect(finalCtrs.ExitCode()).To(Equal(0))
+ Expect(finalCtrs.OutputToString()).To(Equal(""))
+ })
+
})