diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-06-04 14:46:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-04 14:46:49 +0200 |
commit | 8cf74a79e326d4591226c9364851affdcbf13754 (patch) | |
tree | 91fdcf15163113da0edf4b0c9325ae8016ab5b78 /test/e2e | |
parent | 9d138724ab38842381fbc391734ea50d58161bf5 (diff) | |
parent | 42505f64d29e73106dc29658fe7e852b9a5421c5 (diff) | |
download | podman-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/e2e')
-rw-r--r-- | test/e2e/pod_stats_test.go | 17 |
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()) + }) }) |