diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-11-27 10:31:56 -0500 |
---|---|---|
committer | Matthew Heon <matthew.heon@gmail.com> | 2018-11-28 09:35:30 -0500 |
commit | 841f47d728fd1049456012a03b9b4e66407f9489 (patch) | |
tree | c00e1cbefa4f1986034e966e5dbbe9b12aa6d978 | |
parent | fc774ac0e5f6b906484723c600f43a66516a208a (diff) | |
download | podman-841f47d728fd1049456012a03b9b4e66407f9489.tar.gz podman-841f47d728fd1049456012a03b9b4e66407f9489.tar.bz2 podman-841f47d728fd1049456012a03b9b4e66407f9489.zip |
Add test to ensure stopping a stopped container works
We regressed on this at some point. Adding a new test should help
ensure that doesn't happen again.
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
-rw-r--r-- | test/e2e/stop_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/e2e/stop_test.go b/test/e2e/stop_test.go index b172cd81e..5c229b9b4 100644 --- a/test/e2e/stop_test.go +++ b/test/e2e/stop_test.go @@ -57,6 +57,20 @@ var _ = Describe("Podman stop", func() { Expect(session.ExitCode()).To(Equal(0)) }) + It("podman stop stopped container", func() { + session := podmanTest.RunTopContainer("test1") + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + session2 := podmanTest.Podman([]string{"stop", "test1"}) + session2.WaitWithDefaultTimeout() + Expect(session2.ExitCode()).To(Equal(0)) + + session3 := podmanTest.Podman([]string{"stop", "test1"}) + session3.WaitWithDefaultTimeout() + Expect(session3.ExitCode()).To(Equal(0)) + }) + It("podman stop all containers", func() { session := podmanTest.RunTopContainer("test1") session.WaitWithDefaultTimeout() |