aboutsummaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-01-22 09:17:34 -0600
committerMatthew Heon <matthew.heon@pm.me>2019-02-08 15:02:28 -0500
commit431459caf946c1645da31b4fc6c953ad77f9bc85 (patch)
tree77ecef4eff5b8e4252a4bbc5f70a56bfa4882958 /test/e2e
parent28f5d25e8dabb6647699c2ccab8621cefac37d3b (diff)
downloadpodman-431459caf946c1645da31b4fc6c953ad77f9bc85.tar.gz
podman-431459caf946c1645da31b4fc6c953ad77f9bc85.tar.bz2
podman-431459caf946c1645da31b4fc6c953ad77f9bc85.zip
podman image prune -- implement all flag
we now, by default, only prune dangling images. if --all is passed, we prune dangling images AND images that do not have an associated containers. also went ahead and enabled the podman-remote image prune side of things. Fixes: #2192 Signed-off-by: baude <bbaude@redhat.com> MH: Removed dependence on remote-client adapter work to limit scale of changes Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/prune_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/e2e/prune_test.go b/test/e2e/prune_test.go
index 6679a676c..81fb82b20 100644
--- a/test/e2e/prune_test.go
+++ b/test/e2e/prune_test.go
@@ -39,6 +39,7 @@ var _ = Describe("Podman rm", func() {
})
It("podman container prune containers", func() {
+ SkipIfRemote()
top := podmanTest.RunTopContainer("")
top.WaitWithDefaultTimeout()
Expect(top.ExitCode()).To(Equal(0))
@@ -55,6 +56,7 @@ var _ = Describe("Podman rm", func() {
})
It("podman image prune none images", func() {
+ SkipIfRemote()
podmanTest.BuildImage(pruneImage, "alpine_bash:latest", "true")
none := podmanTest.Podman([]string{"images", "-a"})
@@ -72,10 +74,11 @@ var _ = Describe("Podman rm", func() {
Expect(none.ExitCode()).To(Equal(0))
hasNoneAfter, _ := after.GrepString("<none>")
Expect(hasNoneAfter).To(BeFalse())
+ Expect(len(after.OutputToStringArray()) > 1).To(BeTrue())
})
It("podman image prune unused images", func() {
- prune := podmanTest.Podman([]string{"image", "prune"})
+ prune := podmanTest.Podman([]string{"image", "prune", "-a"})
prune.WaitWithDefaultTimeout()
Expect(prune.ExitCode()).To(Equal(0))