diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2019-11-22 16:31:04 +0100 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2019-11-22 16:34:01 +0100 |
commit | d76242e5b4d4463508f85b85d28512f9ad720170 (patch) | |
tree | b3e9d6f77837b0e217234696b5950f8378fc058f | |
parent | 22e7d7d86f945620bbc1bdd3aa9c4a9d3248fa1f (diff) | |
download | podman-d76242e5b4d4463508f85b85d28512f9ad720170.tar.gz podman-d76242e5b4d4463508f85b85d28512f9ad720170.tar.bz2 podman-d76242e5b4d4463508f85b85d28512f9ad720170.zip |
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>
-rw-r--r-- | test/e2e/prune_test.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/e2e/prune_test.go b/test/e2e/prune_test.go index df0525a79..3a7185b48 100644 --- a/test/e2e/prune_test.go +++ b/test/e2e/prune_test.go @@ -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() |