aboutsummaryrefslogtreecommitdiff
path: root/test/e2e/pod_stop_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/pod_stop_test.go')
-rw-r--r--test/e2e/pod_stop_test.go40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/e2e/pod_stop_test.go b/test/e2e/pod_stop_test.go
index 361a63a7f..a61917adb 100644
--- a/test/e2e/pod_stop_test.go
+++ b/test/e2e/pod_stop_test.go
@@ -38,6 +38,46 @@ var _ = Describe("Podman pod stop", func() {
Expect(session.ExitCode()).To(Equal(125))
})
+ It("podman pod stop --ignore bogus pod", func() {
+ SkipIfRemote()
+
+ session := podmanTest.Podman([]string{"pod", "stop", "--ignore", "123"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
+
+ It("podman stop bogus pod and a running pod", func() {
+ _, ec, podid1 := podmanTest.CreatePod("")
+ Expect(ec).To(Equal(0))
+
+ session := podmanTest.RunTopContainerInPod("test1", podid1)
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ session = podmanTest.Podman([]string{"pod", "stop", "bogus", "test1"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(125))
+ })
+
+ It("podman stop --ignore bogus pod and a running pod", func() {
+ SkipIfRemote()
+
+ _, ec, podid1 := podmanTest.CreatePod("")
+ Expect(ec).To(Equal(0))
+
+ session := podmanTest.RunTopContainerInPod("test1", podid1)
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ session = podmanTest.Podman([]string{"pod", "stop", "--ignore", "bogus", "test1"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ session = podmanTest.Podman([]string{"pod", "stop", "--ignore", "test1", "bogus"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
+
It("podman pod stop single empty pod", func() {
_, ec, podid := podmanTest.CreatePod("")
Expect(ec).To(Equal(0))