summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-07-16 13:40:59 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-07-19 13:21:50 +0000
commit9ae7b1a5b176176b1b6a0b8e5d191783b68d9b2c (patch)
tree198cea903d2d289cc83fe01a0dd8c05c6f8510d0 /test
parent4a6f79b62b235c3b0c816c3b5117fac00d2bdadb (diff)
downloadpodman-9ae7b1a5b176176b1b6a0b8e5d191783b68d9b2c.tar.gz
podman-9ae7b1a5b176176b1b6a0b8e5d191783b68d9b2c.tar.bz2
podman-9ae7b1a5b176176b1b6a0b8e5d191783b68d9b2c.zip
oci: keep exposed ports busy and leak the fd into conmon
Bind all the specified TCP and UDP ports so that another process cannot reuse them. The fd of the listener is then leaked into conmon so that the socket is kept busy until the container exits. Closes: https://github.com/projectatomic/libpod/issues/210 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #1100 Approved by: mheon
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_networking_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/e2e/run_networking_test.go b/test/e2e/run_networking_test.go
index 9a2858ca1..e1c1608b9 100644
--- a/test/e2e/run_networking_test.go
+++ b/test/e2e/run_networking_test.go
@@ -65,6 +65,10 @@ var _ = Describe("Podman rmi", func() {
results.Wait(30)
Expect(results.ExitCode()).To(Equal(0))
Expect(results.OutputToString()).To(ContainSubstring("8000"))
+
+ ncBusy := podmanTest.SystemExec("nc", []string{"-l", "-p", "80"})
+ ncBusy.Wait(10)
+ Expect(ncBusy.ExitCode()).ToNot(Equal(0))
})
It("podman run network expose ports in image metadata", func() {