summaryrefslogtreecommitdiff
path: root/test/e2e/pod_ps_test.go
diff options
context:
space:
mode:
authorJakub Guzik <jakubmguzik@gmail.com>2021-08-09 23:57:26 +0200
committerJakub Guzik <jakubmguzik@gmail.com>2021-08-10 22:10:40 +0200
commited30ae4a8aacf87cb9be3cfed2e43499cb4d8649 (patch)
tree7cbad58484441f0c658abed34bbfc0ae61c5b169 /test/e2e/pod_ps_test.go
parent6513adda185986c1994d2a2d354b874aee7543e6 (diff)
downloadpodman-ed30ae4a8aacf87cb9be3cfed2e43499cb4d8649.tar.gz
podman-ed30ae4a8aacf87cb9be3cfed2e43499cb4d8649.tar.bz2
podman-ed30ae4a8aacf87cb9be3cfed2e43499cb4d8649.zip
Add until filter to podman pod ps
This commit adds additional until filter to podman pod ps (ls/list). Additionally, it also adds descriptions for podman pod ps filters available via http api. Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
Diffstat (limited to 'test/e2e/pod_ps_test.go')
-rw-r--r--test/e2e/pod_ps_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/e2e/pod_ps_test.go b/test/e2e/pod_ps_test.go
index c27539d6f..b4a0df904 100644
--- a/test/e2e/pod_ps_test.go
+++ b/test/e2e/pod_ps_test.go
@@ -108,6 +108,22 @@ var _ = Describe("Podman ps", func() {
Expect(result).Should(Exit(0))
})
+ It("podman pod ps --filter until", func() {
+ name := "mypod"
+ _, ec, _ := podmanTest.CreatePod(map[string][]string{"--name": {name}})
+ Expect(ec).To(Equal(0))
+
+ result := podmanTest.Podman([]string{"pod", "ps", "--filter", "until=50"})
+ result.WaitWithDefaultTimeout()
+ Expect(result).Should(Exit(0))
+ Expect(result.OutputToString()).To(Not(ContainSubstring(name)))
+
+ result = podmanTest.Podman([]string{"pod", "ps", "--filter", "until=5000000000"})
+ result.WaitWithDefaultTimeout()
+ Expect(result).Should(Exit(0))
+ Expect(result.OutputToString()).To(ContainSubstring(name))
+ })
+
It("podman pod ps filter name regexp", func() {
_, ec, podid := podmanTest.CreatePod(map[string][]string{"--name": {"mypod"}})
Expect(ec).To(Equal(0))