summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorJoel Smith <joelsmith@redhat.com>2020-11-03 14:59:03 -0700
committerJoel Smith <joelsmith@redhat.com>2020-11-03 15:31:39 -0700
commita47fe37a97b93911b4509636888018fa18de500d (patch)
treec99a9ce32ed005bd86a8b597d1e66d058c262ba7 /test/e2e
parent5f897d2abe960f2e29dd4ae87829c3c769a4423b (diff)
downloadpodman-a47fe37a97b93911b4509636888018fa18de500d.tar.gz
podman-a47fe37a97b93911b4509636888018fa18de500d.tar.bz2
podman-a47fe37a97b93911b4509636888018fa18de500d.zip
Use regex for "pod ps" name filter to match "ps" behavior
Signed-off-by: Joel Smith <joelsmith@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/pod_ps_test.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/e2e/pod_ps_test.go b/test/e2e/pod_ps_test.go
index a299d3cf2..5d63d5985 100644
--- a/test/e2e/pod_ps_test.go
+++ b/test/e2e/pod_ps_test.go
@@ -107,6 +107,28 @@ var _ = Describe("Podman ps", func() {
Expect(result.ExitCode()).To(Equal(0))
})
+ It("podman pod ps filter name regexp", func() {
+ _, ec, podid := podmanTest.CreatePod("mypod")
+ Expect(ec).To(Equal(0))
+ _, ec2, _ := podmanTest.CreatePod("mypod1")
+ Expect(ec2).To(Equal(0))
+
+ result := podmanTest.Podman([]string{"pod", "ps", "-q", "--no-trunc", "--filter", "name=mypod"})
+ result.WaitWithDefaultTimeout()
+ Expect(result.ExitCode()).To(Equal(0))
+
+ output := result.OutputToStringArray()
+ Expect(len(output)).To(Equal(2))
+
+ result = podmanTest.Podman([]string{"pod", "ps", "-q", "--no-trunc", "--filter", "name=mypod$"})
+ result.WaitWithDefaultTimeout()
+ Expect(result.ExitCode()).To(Equal(0))
+
+ output = result.OutputToStringArray()
+ Expect(len(output)).To(Equal(1))
+ Expect(output[0]).To(Equal(podid))
+ })
+
It("podman pod ps mutually exclusive flags", func() {
session := podmanTest.Podman([]string{"pod", "ps", "-q", "--format", "{{.ID}}"})
session.WaitWithDefaultTimeout()