summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-07-27 14:50:24 +0200
committerGitHub <noreply@github.com>2021-07-27 14:50:24 +0200
commit508dc031c6faee02052d660d16aa91566be3f313 (patch)
tree0e15e67c6455bef2cd3c05c1ca8a193ac2dd1748 /test
parent684f15edeea39f53281b04bca04a705ea43a672f (diff)
parent7fa4d2cb18055d10847b2ede366205a44ec4a255 (diff)
downloadpodman-508dc031c6faee02052d660d16aa91566be3f313.tar.gz
podman-508dc031c6faee02052d660d16aa91566be3f313.tar.bz2
podman-508dc031c6faee02052d660d16aa91566be3f313.zip
Merge pull request #10861 from jmguzik/until-prune-volume-cmd
Add prune until filter test for podman volume cli
Diffstat (limited to 'test')
-rw-r--r--test/e2e/volume_prune_test.go31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/e2e/volume_prune_test.go b/test/e2e/volume_prune_test.go
index 68a257110..364ca0ab7 100644
--- a/test/e2e/volume_prune_test.go
+++ b/test/e2e/volume_prune_test.go
@@ -63,6 +63,37 @@ var _ = Describe("Podman volume prune", func() {
podmanTest.Cleanup()
})
+ It("podman prune volume --filter until", func() {
+ session := podmanTest.Podman([]string{"volume", "create", "--label", "label1=value1", "myvol1"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+
+ session = podmanTest.Podman([]string{"volume", "ls"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ Expect(len(session.OutputToStringArray())).To(Equal(2))
+
+ session = podmanTest.Podman([]string{"volume", "prune", "--force", "--filter", "until=50"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+
+ session = podmanTest.Podman([]string{"volume", "ls"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ Expect(len(session.OutputToStringArray())).To(Equal(2))
+
+ session = podmanTest.Podman([]string{"volume", "prune", "--force", "--filter", "until=5000000000"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+
+ session = podmanTest.Podman([]string{"volume", "ls"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ Expect(len(session.OutputToStringArray())).To(Equal(0))
+
+ podmanTest.Cleanup()
+ })
+
It("podman prune volume --filter", func() {
session := podmanTest.Podman([]string{"volume", "create", "--label", "label1=value1", "myvol1"})
session.WaitWithDefaultTimeout()