mirror of
https://github.com/containers/podman.git
synced 2025-05-30 23:17:20 +08:00
e2e/prune: run two top containers
In hope to make the prune tests more robust, run two top containers and stop one explicitly to reduce the risk of a race condition. Fixes: #4452 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
@ -43,9 +43,14 @@ var _ = Describe("Podman prune", func() {
|
||||
top.WaitWithDefaultTimeout()
|
||||
Expect(top.ExitCode()).To(Equal(0))
|
||||
|
||||
session := podmanTest.Podman([]string{"run", ALPINE, "ls"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
top = podmanTest.RunTopContainer("")
|
||||
top.WaitWithDefaultTimeout()
|
||||
Expect(top.ExitCode()).To(Equal(0))
|
||||
cid := top.OutputToString()
|
||||
|
||||
stop := podmanTest.Podman([]string{"stop", cid})
|
||||
stop.WaitWithDefaultTimeout()
|
||||
Expect(stop.ExitCode()).To(Equal(0))
|
||||
|
||||
prune := podmanTest.Podman([]string{"container", "prune"})
|
||||
prune.WaitWithDefaultTimeout()
|
||||
|
Reference in New Issue
Block a user