summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-06-14 13:12:17 +0000
committerGitHub <noreply@github.com>2022-06-14 13:12:17 +0000
commit78ecdad5f8f16dbb6146f2741a3d7ead1ce837bc (patch)
treec6214d1b51693315139277932ee145a51b13a183 /test
parent9fac1b335f681400a029e9d8014f45fa5634ec40 (diff)
parent608ad7d1139d80093d1ddd933027d31af7fdee83 (diff)
downloadpodman-78ecdad5f8f16dbb6146f2741a3d7ead1ce837bc.tar.gz
podman-78ecdad5f8f16dbb6146f2741a3d7ead1ce837bc.tar.bz2
podman-78ecdad5f8f16dbb6146f2741a3d7ead1ce837bc.zip
Merge pull request #14580 from jakecorrenti/stats-on-non-running-container
Non-running containers now report statistics via the `podman stats`
Diffstat (limited to 'test')
-rw-r--r--test/e2e/pause_test.go2
-rw-r--r--test/e2e/stats_test.go11
2 files changed, 12 insertions, 1 deletions
diff --git a/test/e2e/pause_test.go b/test/e2e/pause_test.go
index 402719de2..566aca07e 100644
--- a/test/e2e/pause_test.go
+++ b/test/e2e/pause_test.go
@@ -82,7 +82,7 @@ var _ = Describe("Podman pause", func() {
// check we can read stats for a paused container
result = podmanTest.Podman([]string{"stats", "--no-stream", cid})
result.WaitWithDefaultTimeout()
- Expect(result).To(ExitWithError())
+ Expect(result).Should(Exit(0))
})
It("podman pause a running container by id", func() {
diff --git a/test/e2e/stats_test.go b/test/e2e/stats_test.go
index b43a81cd3..3000a819f 100644
--- a/test/e2e/stats_test.go
+++ b/test/e2e/stats_test.go
@@ -236,4 +236,15 @@ var _ = Describe("Podman stats", func() {
Expect(customLimit).To(BeNumerically("<", defaultLimit))
})
+
+ It("podman stats with a container that is not running", func() {
+ ctr := "created_container"
+ session := podmanTest.Podman([]string{"create", "--name", ctr, ALPINE})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+
+ session = podmanTest.Podman([]string{"stats", "--no-stream", ctr})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ })
})