summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorcdoern <cbdoer23@g.holycross.edu>2021-06-11 08:35:01 -0400
committercdoern <cbdoer23@g.holycross.edu>2021-06-23 09:23:40 -0400
commitf26fa5392110c2b59cb17d4f1013cf6bb4ecd873 (patch)
tree2288c6e882a5a68b1746f543a1c367d6a2bddff2 /test
parent2970e3518cc95910444903f572418f5887316e47 (diff)
downloadpodman-f26fa5392110c2b59cb17d4f1013cf6bb4ecd873.tar.gz
podman-f26fa5392110c2b59cb17d4f1013cf6bb4ecd873.tar.bz2
podman-f26fa5392110c2b59cb17d4f1013cf6bb4ecd873.zip
Podman Stats additional features
added Avg Cpu calculation and CPU up time to podman stats. Adding different feature sets in different PRs, CPU first. resolves #9258 Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/stats_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/e2e/stats_test.go b/test/e2e/stats_test.go
index 2218d72b5..7ab3dabc9 100644
--- a/test/e2e/stats_test.go
+++ b/test/e2e/stats_test.go
@@ -83,6 +83,17 @@ var _ = Describe("Podman stats", func() {
Expect(session.ExitCode()).To(Equal(0))
})
+ It("podman stats only output CPU data", func() {
+ session := podmanTest.RunTopContainer("")
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ session = podmanTest.Podman([]string{"stats", "--all", "--no-stream", "--format", "\"{{.ID}} {{.UpTime}} {{.AVGCPU}}\""})
+ session.WaitWithDefaultTimeout()
+ Expect(session.LineInOutputContains("UpTime")).To(BeTrue())
+ Expect(session.LineInOutputContains("AVGCPU")).To(BeTrue())
+ Expect(session.ExitCode()).To(Equal(0))
+ })
+
It("podman stats with json output", func() {
var found bool
session := podmanTest.RunTopContainer("")