summaryrefslogtreecommitdiff
path: root/test/e2e/prune_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-16 17:47:12 +0100
committerGitHub <noreply@github.com>2020-11-16 17:47:12 +0100
commit6f08f2a2385d0dd8ad7c246e0996f932ad0f1a2f (patch)
tree60add739974b0e83a79b71cfcaa8f38bf265582e /test/e2e/prune_test.go
parent59b0a0bd72df3f61e373324a9b0c1e1014f8ad5a (diff)
parent15539c1c4bdb10095bb4d30c6283795dac657600 (diff)
downloadpodman-6f08f2a2385d0dd8ad7c246e0996f932ad0f1a2f.tar.gz
podman-6f08f2a2385d0dd8ad7c246e0996f932ad0f1a2f.tar.bz2
podman-6f08f2a2385d0dd8ad7c246e0996f932ad0f1a2f.zip
Merge pull request #8324 from baude/speedupe2eremote
use lookaside storage for remote tests
Diffstat (limited to 'test/e2e/prune_test.go')
-rw-r--r--test/e2e/prune_test.go21
1 files changed, 11 insertions, 10 deletions
diff --git a/test/e2e/prune_test.go b/test/e2e/prune_test.go
index 969f96165..c02ed5a50 100644
--- a/test/e2e/prune_test.go
+++ b/test/e2e/prune_test.go
@@ -135,28 +135,29 @@ var _ = Describe("Podman prune", func() {
})
It("podman image prune unused images", func() {
- podmanTest.RestoreAllArtifacts()
- prune := podmanTest.PodmanNoCache([]string{"image", "prune", "-af"})
+ podmanTest.AddImageToRWStore(ALPINE)
+ podmanTest.AddImageToRWStore(BB)
+ prune := podmanTest.Podman([]string{"image", "prune", "-af"})
prune.WaitWithDefaultTimeout()
Expect(prune.ExitCode()).To(Equal(0))
- images := podmanTest.PodmanNoCache([]string{"images", "-aq"})
+ images := podmanTest.Podman([]string{"images", "-aq"})
images.WaitWithDefaultTimeout()
// all images are unused, so they all should be deleted!
- Expect(len(images.OutputToStringArray())).To(Equal(0))
+ Expect(len(images.OutputToStringArray())).To(Equal(len(CACHE_IMAGES)))
})
It("podman system image prune unused images", func() {
- podmanTest.RestoreAllArtifacts()
+ podmanTest.AddImageToRWStore(ALPINE)
podmanTest.BuildImage(pruneImage, "alpine_bash:latest", "true")
- prune := podmanTest.PodmanNoCache([]string{"system", "prune", "-a", "--force"})
+ prune := podmanTest.Podman([]string{"system", "prune", "-a", "--force"})
prune.WaitWithDefaultTimeout()
Expect(prune.ExitCode()).To(Equal(0))
- images := podmanTest.PodmanNoCache([]string{"images", "-aq"})
+ images := podmanTest.Podman([]string{"images", "-aq"})
images.WaitWithDefaultTimeout()
// all images are unused, so they all should be deleted!
- Expect(len(images.OutputToStringArray())).To(Equal(0))
+ Expect(len(images.OutputToStringArray())).To(Equal(len(CACHE_IMAGES)))
})
It("podman system prune pods", func() {
@@ -343,9 +344,9 @@ var _ = Describe("Podman prune", func() {
Expect(session.ExitCode()).To(Equal(0))
Expect(len(session.OutputToStringArray())).To(Equal(2))
- images := podmanTest.PodmanNoCache([]string{"images", "-aq"})
+ images := podmanTest.Podman([]string{"images", "-aq"})
images.WaitWithDefaultTimeout()
// all images are unused, so they all should be deleted!
- Expect(len(images.OutputToStringArray())).To(Equal(0))
+ Expect(len(images.OutputToStringArray())).To(Equal(len(CACHE_IMAGES)))
})
})