summaryrefslogtreecommitdiff
path: root/test/e2e/stop_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-03-04 12:24:26 -0800
committerGitHub <noreply@github.com>2019-03-04 12:24:26 -0800
commit33be9e6845d74755a6626b9f142f6c264f6b670a (patch)
treef3d42325eadc8bc4a58fa3289815225763c1fd81 /test/e2e/stop_test.go
parent34bf58c5dbb898ef9f813e79b13735eecc933369 (diff)
parentae47a7c47e103f22e557de394342054ca801168c (diff)
downloadpodman-33be9e6845d74755a6626b9f142f6c264f6b670a.tar.gz
podman-33be9e6845d74755a6626b9f142f6c264f6b670a.tar.bz2
podman-33be9e6845d74755a6626b9f142f6c264f6b670a.zip
Merge pull request #2523 from jwhonce/bug/2521
Fix #2521
Diffstat (limited to 'test/e2e/stop_test.go')
-rw-r--r--test/e2e/stop_test.go28
1 files changed, 27 insertions, 1 deletions
diff --git a/test/e2e/stop_test.go b/test/e2e/stop_test.go
index eb680d2a1..cd0d804ee 100644
--- a/test/e2e/stop_test.go
+++ b/test/e2e/stop_test.go
@@ -82,7 +82,7 @@ var _ = Describe("Podman stop", func() {
Expect(session3.ExitCode()).To(Equal(0))
})
- It("podman stop all containers", func() {
+ It("podman stop all containers -t", func() {
session := podmanTest.RunTopContainer("test1")
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -107,6 +107,32 @@ var _ = Describe("Podman stop", func() {
Expect(output).To(ContainSubstring(cid3))
})
+ It("podman stop container --time", func() {
+ session := podmanTest.RunTopContainer("test4")
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ cid1 := session.OutputToString()
+
+ session = podmanTest.Podman([]string{"stop", "--time", "1", "test4"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ output := session.OutputToString()
+ Expect(output).To(ContainSubstring(cid1))
+ })
+
+ It("podman stop container --timeout", func() {
+ session := podmanTest.RunTopContainer("test5")
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ cid1 := session.OutputToString()
+
+ session = podmanTest.Podman([]string{"stop", "--timeout", "1", "test5"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ output := session.OutputToString()
+ Expect(output).To(ContainSubstring(cid1))
+ })
+
It("podman stop latest containers", func() {
session := podmanTest.RunTopContainer("test1")
session.WaitWithDefaultTimeout()