diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2019-10-16 10:30:57 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2019-10-23 13:48:54 +0200 |
commit | 77a2bbb1c0df2536638e5a9030cda05d6524513e (patch) | |
tree | 9d2eb86f75ff52c4d220eaa2117ced3f77889156 /test/e2e/stats_test.go | |
parent | 46ad6bc1faac82555a9e6cfea93536e2a504e2e8 (diff) | |
download | podman-77a2bbb1c0df2536638e5a9030cda05d6524513e.tar.gz podman-77a2bbb1c0df2536638e5a9030cda05d6524513e.tar.bz2 podman-77a2bbb1c0df2536638e5a9030cda05d6524513e.zip |
stats: list all running containers unless specified otherwise
Unless specified otherwise by --all, --latest or via arguments, list all
running containers. This matches the behaviour of Docker and is also
illustrated in the man pages where containers and options are marked to
be optional.
Fixes: #4274
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'test/e2e/stats_test.go')
-rw-r--r-- | test/e2e/stats_test.go | 11 |
1 files changed, 11 insertions, 0 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() |