diff options
author | Matthew Heon <mheon@redhat.com> | 2020-02-03 22:39:50 -0500 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2020-02-04 09:52:25 -0500 |
commit | ee5b749e653f4c78298d1e290d5a1ae03edc3c05 (patch) | |
tree | 997b4c37b9fbe5d9cac564f62c241750c9950d40 /test | |
parent | c4f6d5615a34ea67b1335a2a446bd09789d98015 (diff) | |
download | podman-ee5b749e653f4c78298d1e290d5a1ae03edc3c05.tar.gz podman-ee5b749e653f4c78298d1e290d5a1ae03edc3c05.tar.bz2 podman-ee5b749e653f4c78298d1e290d5a1ae03edc3c05.zip |
Force --all when --filter is passed to podman ps
When we filter, it should be out of all containers, not just
running ones, by default - this is necessary to ensure Docker
compatability.
Fixes #5050
Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/ps_test.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/e2e/ps_test.go b/test/e2e/ps_test.go index 12bfdfe41..fccc5c93b 100644 --- a/test/e2e/ps_test.go +++ b/test/e2e/ps_test.go @@ -227,6 +227,22 @@ var _ = Describe("Podman ps", func() { Expect(output[0]).To(Equal(fullCid)) }) + It("podman ps filter by exited does not need all", func() { + ctr := podmanTest.Podman([]string{"run", "-t", "-i", ALPINE, "ls", "/"}) + ctr.WaitWithDefaultTimeout() + Expect(ctr.ExitCode()).To(Equal(0)) + + psAll := podmanTest.Podman([]string{"ps", "-aq", "--no-trunc"}) + psAll.WaitWithDefaultTimeout() + Expect(psAll.ExitCode()).To(Equal(0)) + + psFilter := podmanTest.Podman([]string{"ps", "--no-trunc", "--quiet", "--filter", "status=exited"}) + psFilter.WaitWithDefaultTimeout() + Expect(psFilter.ExitCode()).To(Equal(0)) + + Expect(psAll.OutputToString()).To(Equal(psFilter.OutputToString())) + }) + It("podman ps mutually exclusive flags", func() { session := podmanTest.Podman([]string{"ps", "-aqs"}) session.WaitWithDefaultTimeout() |