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.go41
1 files changed, 40 insertions, 1 deletions
diff --git a/test/e2e/stop_test.go b/test/e2e/stop_test.go
index 61c3fedfd..259410736 100644
--- a/test/e2e/stop_test.go
+++ b/test/e2e/stop_test.go
@@ -48,6 +48,11 @@ var _ = Describe("Podman stop", func() {
session = podmanTest.Podman([]string{"stop", cid})
session.WaitWithDefaultTimeout()
Expect(session.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 container by name", func() {
@@ -57,15 +62,25 @@ var _ = Describe("Podman stop", func() {
session = podmanTest.Podman([]string{"stop", "test1"})
session.WaitWithDefaultTimeout()
Expect(session.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 container by name", func() {
+ It("podman container stop by name", func() {
session := podmanTest.RunTopContainer("test1")
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
session = podmanTest.Podman([]string{"container", "stop", "test1"})
session.WaitWithDefaultTimeout()
Expect(session.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 stopped container", func() {
@@ -80,6 +95,11 @@ var _ = Describe("Podman stop", func() {
session3 := podmanTest.Podman([]string{"stop", "test1"})
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(""))
})
It("podman stop all containers -t", func() {
@@ -105,6 +125,11 @@ var _ = Describe("Podman stop", func() {
Expect(output).To(ContainSubstring(cid1))
Expect(output).To(ContainSubstring(cid2))
Expect(output).To(ContainSubstring(cid3))
+
+ finalCtrs := podmanTest.Podman([]string("ps", "-q"))
+ finalCtrs.WaitWithDefaultTimeout()
+ Expect(finalCtrs.ExitCode()).To(Equal(0))
+ Expect(finalCtrs.OutputToString()).To(Equal(""))
})
It("podman stop container --time", func() {
@@ -118,6 +143,11 @@ var _ = Describe("Podman stop", func() {
Expect(session.ExitCode()).To(Equal(0))
output := session.OutputToString()
Expect(output).To(ContainSubstring(cid1))
+
+ finalCtrs := podmanTest.Podman([]string("ps", "-q"))
+ finalCtrs.WaitWithDefaultTimeout()
+ Expect(finalCtrs.ExitCode()).To(Equal(0))
+ Expect(finalCtrs.OutputToString()).To(Equal(""))
})
It("podman stop container --timeout", func() {
@@ -131,6 +161,11 @@ var _ = Describe("Podman stop", func() {
Expect(session.ExitCode()).To(Equal(0))
output := session.OutputToString()
Expect(output).To(ContainSubstring(cid1))
+
+ finalCtrs := podmanTest.Podman([]string("ps", "-q"))
+ finalCtrs.WaitWithDefaultTimeout()
+ Expect(finalCtrs.ExitCode()).To(Equal(0))
+ Expect(finalCtrs.OutputToString()).To(Equal(""))
})
It("podman stop latest containers", func() {
@@ -140,6 +175,10 @@ var _ = Describe("Podman stop", func() {
session = podmanTest.Podman([]string{"stop", "-l", "-t", "1"})
session.WaitWithDefaultTimeout()
Expect(session.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 stopped", func() {