summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-10-23 15:43:49 +0200
committerGitHub <noreply@github.com>2019-10-23 15:43:49 +0200
commitef556cfecf4d41f63c03eedf127683dad7797e71 (patch)
tree9d2eb86f75ff52c4d220eaa2117ced3f77889156 /test
parent46ad6bc1faac82555a9e6cfea93536e2a504e2e8 (diff)
parent77a2bbb1c0df2536638e5a9030cda05d6524513e (diff)
downloadpodman-ef556cfecf4d41f63c03eedf127683dad7797e71.tar.gz
podman-ef556cfecf4d41f63c03eedf127683dad7797e71.tar.bz2
podman-ef556cfecf4d41f63c03eedf127683dad7797e71.zip
Merge pull request #4275 from vrothberg/fix-4274
stats: list all running containers unless specified otherwise
Diffstat (limited to 'test')
-rw-r--r--test/e2e/stats_test.go11
-rw-r--r--test/system/015-help.bats8
2 files changed, 16 insertions, 3 deletions
diff --git a/test/e2e/stats_test.go b/test/e2e/stats_test.go
index 4000ab33a..fbf7c9920 100644
--- a/test/e2e/stats_test.go
+++ b/test/e2e/stats_test.go
@@ -11,6 +11,8 @@ import (
. "github.com/onsi/gomega"
)
+// TODO: we need to check the output. Currently, we only check the exit codes
+// which is not enough.
var _ = Describe("Podman stats", func() {
var (
tempdir string
@@ -61,6 +63,15 @@ var _ = Describe("Podman stats", func() {
Expect(session.ExitCode()).To(Equal(0))
})
+ It("podman stats on all running containers", func() {
+ session := podmanTest.RunTopContainer("")
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ session = podmanTest.Podman([]string{"stats", "--no-stream"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
+
It("podman stats only output cids", func() {
session := podmanTest.RunTopContainer("")
session.WaitWithDefaultTimeout()
diff --git a/test/system/015-help.bats b/test/system/015-help.bats
index a987f04bc..fd4be87b2 100644
--- a/test/system/015-help.bats
+++ b/test/system/015-help.bats
@@ -55,9 +55,11 @@ function check_help() {
# If usage has required arguments, try running without them
if expr "$usage" : '.*\[flags\] [A-Z]' >/dev/null; then
- dprint "podman $@ $cmd (without required args)"
- run_podman 125 "$@" $cmd
- is "$output" "Error:"
+ if [ "$cmd" != "stats"]; then
+ dprint "podman $@ $cmd (without required args)"
+ run_podman 125 "$@" $cmd
+ is "$output" "Error:"
+ fi
fi
count=$(expr $count + 1)