summaryrefslogtreecommitdiff
path: root/test/e2e/run_networking_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/run_networking_test.go')
-rw-r--r--test/e2e/run_networking_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/e2e/run_networking_test.go b/test/e2e/run_networking_test.go
index b56b11634..9a2858ca1 100644
--- a/test/e2e/run_networking_test.go
+++ b/test/e2e/run_networking_test.go
@@ -77,4 +77,18 @@ var _ = Describe("Podman rmi", func() {
Expect(results.ExitCode()).To(Equal(0))
Expect(results.OutputToString()).To(ContainSubstring(": 80,"))
})
+
+ It("podman run network expose duplicate host port results in error", func() {
+ session := podmanTest.Podman([]string{"run", "-dt", "-p", "80", ALPINE, "/bin/sh"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ inspect := podmanTest.Podman([]string{"inspect", "-l"})
+ inspect.WaitWithDefaultTimeout()
+ Expect(inspect.ExitCode()).To(Equal(0))
+
+ containerConfig := inspect.InspectContainerToJSON()
+ Expect(containerConfig[0].NetworkSettings.Ports[0].HostPort).ToNot(Equal("80"))
+ })
+
})