summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-04 14:46:49 +0200
committerGitHub <noreply@github.com>2020-06-04 14:46:49 +0200
commit8cf74a79e326d4591226c9364851affdcbf13754 (patch)
tree91fdcf15163113da0edf4b0c9325ae8016ab5b78 /test
parent9d138724ab38842381fbc391734ea50d58161bf5 (diff)
parent42505f64d29e73106dc29658fe7e852b9a5421c5 (diff)
downloadpodman-8cf74a79e326d4591226c9364851affdcbf13754.tar.gz
podman-8cf74a79e326d4591226c9364851affdcbf13754.tar.bz2
podman-8cf74a79e326d4591226c9364851affdcbf13754.zip
Merge pull request #6470 from mheon/fix_stats_nonet
Properly follow linked namespace container for stats
Diffstat (limited to 'test')
-rw-r--r--test/e2e/pod_stats_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/e2e/pod_stats_test.go b/test/e2e/pod_stats_test.go
index 9bba59073..778b44d1e 100644
--- a/test/e2e/pod_stats_test.go
+++ b/test/e2e/pod_stats_test.go
@@ -178,4 +178,21 @@ var _ = Describe("Podman pod stats", func() {
Expect(stats).To(ExitWithError())
})
+ It("podman stats on net=host post", func() {
+ // --net=host not supported for rootless pods at present
+ SkipIfRootless()
+ podName := "testPod"
+ podCreate := podmanTest.Podman([]string{"pod", "create", "--net=host", "--name", podName})
+ podCreate.WaitWithDefaultTimeout()
+ Expect(podCreate.ExitCode()).To(Equal(0))
+
+ ctrRun := podmanTest.Podman([]string{"run", "-d", "--pod", podName, ALPINE, "top"})
+ ctrRun.WaitWithDefaultTimeout()
+ Expect(ctrRun.ExitCode()).To(Equal(0))
+
+ stats := podmanTest.Podman([]string{"pod", "stats", "--format", "json", "--no-stream", podName})
+ stats.WaitWithDefaultTimeout()
+ Expect(stats.ExitCode()).To(Equal(0))
+ Expect(stats.IsJSONOutputValid()).To(BeTrue())
+ })
})