mirror of
https://github.com/containers/podman.git
synced 2025-06-26 04:46:57 +08:00
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>
This commit is contained in:
@ -57,6 +57,20 @@ var _ = Describe("Podman stop", func() {
|
|||||||
Expect(session.ExitCode()).To(Equal(0))
|
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() {
|
It("podman stop all containers", func() {
|
||||||
session := podmanTest.RunTopContainer("test1")
|
session := podmanTest.RunTopContainer("test1")
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
|
Reference in New Issue
Block a user