summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-02-13 20:51:22 +0100
committerGitHub <noreply@github.com>2020-02-13 20:51:22 +0100
commit3e0475eb8891499630d0eefb9b133a1356e7abac (patch)
treeabd15ff65758becdc2484b0a0e0741b15a8159b0 /test
parente4e5efc12b7902a22561170ca59f3da90b7b80ce (diff)
parentd2100cd47359ef0afa1a25f6f3a6a7708cd855f7 (diff)
downloadpodman-3e0475eb8891499630d0eefb9b133a1356e7abac.tar.gz
podman-3e0475eb8891499630d0eefb9b133a1356e7abac.tar.bz2
podman-3e0475eb8891499630d0eefb9b133a1356e7abac.zip
Merge pull request #5189 from mheon/only_set_all_on_status
Only set --all when a status filter is given to ps
Diffstat (limited to 'test')
-rw-r--r--test/e2e/ps_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/e2e/ps_test.go b/test/e2e/ps_test.go
index fccc5c93b..48dd186e2 100644
--- a/test/e2e/ps_test.go
+++ b/test/e2e/ps_test.go
@@ -243,6 +243,19 @@ var _ = Describe("Podman ps", func() {
Expect(psAll.OutputToString()).To(Equal(psFilter.OutputToString()))
})
+ It("podman filter without status does not find non-running", func() {
+ ctrName := "aContainerName"
+ ctr := podmanTest.Podman([]string{"create", "--name", ctrName, "-t", "-i", ALPINE, "ls", "/"})
+ ctr.WaitWithDefaultTimeout()
+ Expect(ctr.ExitCode()).To(Equal(0))
+
+ psFilter := podmanTest.Podman([]string{"ps", "--no-trunc", "--quiet", "--format", "{{.Names}}", "--filter", fmt.Sprintf("name=%s", ctrName)})
+ psFilter.WaitWithDefaultTimeout()
+ Expect(psFilter.ExitCode()).To(Equal(0))
+
+ Expect(strings.Contains(psFilter.OutputToString(), ctrName)).To(BeFalse())
+ })
+
It("podman ps mutually exclusive flags", func() {
session := podmanTest.Podman([]string{"ps", "-aqs"})
session.WaitWithDefaultTimeout()