diff options
author | haircommander <pehunt@redhat.com> | 2018-08-20 18:29:44 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-08-21 14:34:08 +0000 |
commit | 021027a24b7b6906a2d7ed86c67e34167bc26284 (patch) | |
tree | d4f4aeaca4dce8a7fb776d22dea8e29f4b13dec4 /test | |
parent | 7e94fbb4936d189cd79e2159859f0f8aa02584e6 (diff) | |
download | podman-021027a24b7b6906a2d7ed86c67e34167bc26284.tar.gz podman-021027a24b7b6906a2d7ed86c67e34167bc26284.tar.bz2 podman-021027a24b7b6906a2d7ed86c67e34167bc26284.zip |
Enable pod stats with short ID and name
Signed-off-by: haircommander <pehunt@redhat.com>
Closes: #1307
Approved by: rhatdan
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/pod_stats_test.go | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/e2e/pod_stats_test.go b/test/e2e/pod_stats_test.go index 692946f33..b7f939aa9 100644 --- a/test/e2e/pod_stats_test.go +++ b/test/e2e/pod_stats_test.go @@ -61,6 +61,44 @@ var _ = Describe("Podman pod stats", func() { Expect(stats.ExitCode()).To(Equal(0)) }) + It("podman stats on a specific running pod with shortID", func() { + session := podmanTest.Podman([]string{"pod", "create"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + podid := session.OutputToString() + + session = podmanTest.RunTopContainerInPod("", podid) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + session = podmanTest.RunTopContainerInPod("", podid) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + stats := podmanTest.Podman([]string{"pod", "stats", "--no-stream", podid[:5]}) + stats.WaitWithDefaultTimeout() + Expect(stats.ExitCode()).To(Equal(0)) + }) + + It("podman stats on a specific running pod with name", func() { + session := podmanTest.Podman([]string{"pod", "create", "--name", "test"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + podid := session.OutputToString() + + session = podmanTest.RunTopContainerInPod("", podid) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + session = podmanTest.RunTopContainerInPod("", podid) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + stats := podmanTest.Podman([]string{"pod", "stats", "--no-stream", "test"}) + stats.WaitWithDefaultTimeout() + Expect(stats.ExitCode()).To(Equal(0)) + }) + It("podman stats on running pods", func() { session := podmanTest.Podman([]string{"pod", "create"}) session.WaitWithDefaultTimeout() |