summaryrefslogtreecommitdiff
path: root/test/system/500-networking.bats
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2020-05-28 13:43:59 -0600
committerEd Santiago <santiago@redhat.com>2020-06-01 12:00:47 -0600
commit03d32d05ac15c7b542d8761d8a7839865f362386 (patch)
tree0e2251c8cb31a0d91a9888bf8a1c20ec1181e171 /test/system/500-networking.bats
parent5f1c23dba9f6e02ed2551aabda371d007e9057e2 (diff)
downloadpodman-03d32d05ac15c7b542d8761d8a7839865f362386.tar.gz
podman-03d32d05ac15c7b542d8761d8a7839865f362386.tar.bz2
podman-03d32d05ac15c7b542d8761d8a7839865f362386.zip
system tests : more tests
- exec: add test for #5046, in which conmon swallowed chars on a large byte transfer - pod: add 'pod exists' tests, both positive and negative; consolidate tests; add '--label', and check in 'pod inspect' add 'pod ps' tests - networking: add test for #5466, in which detached run with --userns=keep-id would not forward a port Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/system/500-networking.bats')
-rw-r--r--test/system/500-networking.bats23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/system/500-networking.bats b/test/system/500-networking.bats
index cd836610b..c9d1984d0 100644
--- a/test/system/500-networking.bats
+++ b/test/system/500-networking.bats
@@ -60,4 +60,27 @@ load helpers
run_podman rmi busybox
}
+# Issue #5466 - port-forwarding doesn't work with this option and -d
+@test "podman networking: port with --userns=keep-id" {
+ skip_if_remote
+
+ # FIXME: randomize port, and create second random host port
+ myport=54321
+
+ # Container will exit as soon as 'nc' receives input
+ run_podman run -d --userns=keep-id -p 127.0.0.1:$myport:$myport \
+ $IMAGE nc -l -p $myport
+ cid="$output"
+
+ # emit random string, and check it
+ teststring=$(random_string 30)
+ echo "$teststring" | nc 127.0.0.1 $myport
+
+ run_podman logs $cid
+ is "$output" "$teststring" "test string received on container"
+
+ # Clean up
+ run_podman rm $cid
+}
+
# vim: filetype=sh