summaryrefslogtreecommitdiff
path: root/test/system/500-networking.bats
diff options
context:
space:
mode:
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