mirror of
https://github.com/containers/podman.git
synced 2025-06-24 19:42:56 +08:00
test/e2e: fix pause tests to unpause before cleanup()
The Cleanup() function tries to stop all containers, a paused contianer cannot be stopped. The tests should make sure it works. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -124,5 +124,11 @@ var _ = Describe("Podman container cleanup", func() {
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(125))
|
||||
Expect(session.ErrorToString()).To(ContainSubstring("container state improper"))
|
||||
|
||||
// unpause so that the cleanup can stop the container,
|
||||
// otherwise it fails with container state improper
|
||||
session = podmanTest.Podman([]string{"unpause", "paused"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
})
|
||||
})
|
||||
|
@ -151,6 +151,11 @@ var _ = Describe("Podman pause", func() {
|
||||
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(0))
|
||||
Expect(strings.ToLower(podmanTest.GetContainerStatus())).To(ContainSubstring(pausedState))
|
||||
|
||||
// unpause so that the cleanup can stop the container,
|
||||
// otherwise it fails with container state improper
|
||||
session = podmanTest.Podman([]string{"unpause", cid})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
})
|
||||
|
||||
It("podman remove a paused container by id with force", func() {
|
||||
|
Reference in New Issue
Block a user