From d47d976c0b53d4d3ac9689e71e8c37eaf45e1772 Mon Sep 17 00:00:00 2001 From: Kunal Kushwaha Date: Fri, 15 Mar 2019 15:50:11 +0900 Subject: testcase added for listing range of ports in ps command Signed-off-by: Kunal Kushwaha --- test/e2e/ps_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test') diff --git a/test/e2e/ps_test.go b/test/e2e/ps_test.go index 58697acde..92ca538f0 100644 --- a/test/e2e/ps_test.go +++ b/test/e2e/ps_test.go @@ -303,4 +303,18 @@ var _ = Describe("Podman ps", func() { Expect(session.OutputToString()).To(ContainSubstring(podid)) }) + + It("podman ps test with port range", func() { + session := podmanTest.RunTopContainer("") + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + session = podmanTest.Podman([]string{"run", "-dt", "-p", "1000-1006:1000-1006", ALPINE, "top"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + session = podmanTest.Podman([]string{"ps", "--format", "{{.Ports}}"}) + session.WaitWithDefaultTimeout() + Expect(session.OutputToString()).To(ContainSubstring("0.0.0.0:1000-1006")) + }) }) -- cgit v1.2.3-54-g00ecf