summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-25 13:22:36 -0400
committerGitHub <noreply@github.com>2020-06-25 13:22:36 -0400
commit358e69cc2da255b5acf17b3a986dde84cbbf8633 (patch)
treeeb12b7e5acd1fca9b58e05c2cadfa712de6c4eb0 /test
parent12761ede68d1fd55c0da6d5651c5ee8cf33f421b (diff)
parent16b3356a89ba97ec4d7752d43dfe2e695cf4ca82 (diff)
downloadpodman-358e69cc2da255b5acf17b3a986dde84cbbf8633.tar.gz
podman-358e69cc2da255b5acf17b3a986dde84cbbf8633.tar.bz2
podman-358e69cc2da255b5acf17b3a986dde84cbbf8633.zip
Merge pull request #6761 from mheon/fix_ps_portmappings
Print port mappings in `ps` for ctrs sharing network
Diffstat (limited to 'test')
-rw-r--r--test/e2e/ps_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/e2e/ps_test.go b/test/e2e/ps_test.go
index 0dc8e01af..cfc0a415e 100644
--- a/test/e2e/ps_test.go
+++ b/test/e2e/ps_test.go
@@ -449,4 +449,21 @@ var _ = Describe("Podman ps", func() {
Expect(len(output)).To(Equal(1))
Expect(output[0]).To(Equal(ctrName))
})
+
+ It("podman ps test with port shared with pod", func() {
+ podName := "testPod"
+ pod := podmanTest.Podman([]string{"pod", "create", "-p", "8080:80", "--name", podName})
+ pod.WaitWithDefaultTimeout()
+ Expect(pod.ExitCode()).To(Equal(0))
+
+ ctrName := "testCtr"
+ session := podmanTest.Podman([]string{"run", "--name", ctrName, "-dt", "--pod", podName, ALPINE, "top"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ ps := podmanTest.Podman([]string{"ps", "--filter", fmt.Sprintf("name=%s", ctrName), "--format", "{{.Ports}}"})
+ ps.WaitWithDefaultTimeout()
+ Expect(ps.ExitCode()).To(Equal(0))
+ Expect(ps.OutputToString()).To(ContainSubstring("0.0.0.0:8080->80/tcp"))
+ })
})