diff options
Diffstat (limited to 'test/e2e/prune_test.go')
-rw-r--r-- | test/e2e/prune_test.go | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/test/e2e/prune_test.go b/test/e2e/prune_test.go index df0525a79..16522785b 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() @@ -64,7 +69,7 @@ var _ = Describe("Podman prune", func() { hasNone, _ := none.GrepString("<none>") Expect(hasNone).To(BeTrue()) - prune := podmanTest.Podman([]string{"image", "prune"}) + prune := podmanTest.Podman([]string{"image", "prune", "-f"}) prune.WaitWithDefaultTimeout() Expect(prune.ExitCode()).To(Equal(0)) @@ -78,7 +83,7 @@ var _ = Describe("Podman prune", func() { It("podman image prune unused images", func() { podmanTest.RestoreAllArtifacts() - prune := podmanTest.PodmanNoCache([]string{"image", "prune", "-a"}) + prune := podmanTest.PodmanNoCache([]string{"image", "prune", "-af"}) prune.WaitWithDefaultTimeout() Expect(prune.ExitCode()).To(Equal(0)) |