summaryrefslogtreecommitdiff
path: root/test/e2e/volume_prune_test.go
diff options
context:
space:
mode:
authorJakub Guzik <jakubmguzik@gmail.com>2021-07-26 22:37:45 +0200
committerJakub Guzik <jakubmguzik@gmail.com>2021-07-26 22:37:45 +0200
commit7fa4d2cb18055d10847b2ede366205a44ec4a255 (patch)
tree9b4ded48c0f1662543f15a5ecc0e1e1304541503 /test/e2e/volume_prune_test.go
parent4f5b19c5080543974c3498804b43d277271b2f33 (diff)
downloadpodman-7fa4d2cb18055d10847b2ede366205a44ec4a255.tar.gz
podman-7fa4d2cb18055d10847b2ede366205a44ec4a255.tar.bz2
podman-7fa4d2cb18055d10847b2ede366205a44ec4a255.zip
Add prune until filter test for podman volume cli
This commit follows work started in #10756. Changes made in #11015 enabled cli support for volume prune --filter until. Adding e2e test closes #10579. Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
Diffstat (limited to 'test/e2e/volume_prune_test.go')
-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()