aboutsummaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-12-26 17:45:55 -0500
committerMatthew Heon <matthew.heon@pm.me>2019-12-26 17:45:55 -0500
commit25860df8785c6d51ced8320ec6d0d9620171bdb9 (patch)
tree5dd5aa1f2d1ac038d28ad6261640436c1e461462 /test/e2e
parentc759c3f78dcbbf5dec462a863ad25cd41a1707b7 (diff)
downloadpodman-25860df8785c6d51ced8320ec6d0d9620171bdb9.tar.gz
podman-25860df8785c6d51ced8320ec6d0d9620171bdb9.tar.bz2
podman-25860df8785c6d51ced8320ec6d0d9620171bdb9.zip
The --quiet flag does not conflict with templates in ps
To match Docker behavior, make `--quiet` and `--format` with a Go template not conflict. Instead, just turn off `--quiet` in such cases, as we'll be using Go template output instead. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/ps_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/e2e/ps_test.go b/test/e2e/ps_test.go
index a436d4f09..362c7aabb 100644
--- a/test/e2e/ps_test.go
+++ b/test/e2e/ps_test.go
@@ -361,4 +361,19 @@ var _ = Describe("Podman ps", func() {
Expect(len(output)).To(Equal(1))
Expect(output[0]).To(Equal(fullCid))
})
+
+ It("podman ps quiet template", func() {
+ ctrName := "testCtr"
+ session := podmanTest.Podman([]string{"run", "-d", "--name", ctrName, ALPINE, "top"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ result := podmanTest.Podman([]string{"ps", "-q", "-a", "--format", "{{ .Names }}"})
+ result.WaitWithDefaultTimeout()
+ Expect(result.ExitCode()).To(Equal(0))
+
+ output := result.OutputToStringArray()
+ Expect(len(output)).To(Equal(1))
+ Expect(output[0]).To(Equal(ctrName))
+ })
})