aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-22 11:05:36 -0400
committerGitHub <noreply@github.com>2022-04-22 11:05:36 -0400
commit1a768dbc089c91dda7f552cb89134be9fa498136 (patch)
tree8a79e20034ffec4a7038d8c67abf02287fc3935c
parent9168faffbfa7dd41707fdcdd0d7e183d09764fa3 (diff)
parent454468e0343197570df5e93647bfdc45024bc024 (diff)
downloadpodman-1a768dbc089c91dda7f552cb89134be9fa498136.tar.gz
podman-1a768dbc089c91dda7f552cb89134be9fa498136.tar.bz2
podman-1a768dbc089c91dda7f552cb89134be9fa498136.zip
Merge pull request #13976 from rhatdan/rootless
Update test to run network check in both rootless and rootfull mode
-rw-r--r--test/system/500-networking.bats7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/system/500-networking.bats b/test/system/500-networking.bats
index 0c3062a7e..958aa4493 100644
--- a/test/system/500-networking.bats
+++ b/test/system/500-networking.bats
@@ -83,8 +83,7 @@ load helpers
}
# Issue #5466 - port-forwarding doesn't work with this option and -d
-@test "podman networking: port with --userns=keep-id" {
- skip_if_not_rootless "--userns=keep-id only works in rootless mode"
+@test "podman networking: port with --userns=keep-id for rootless or --uidmap=* for rootfull" {
for cidr in "" "$(random_rfc1918_subnet).0/24"; do
myport=$(random_free_port 52000-52999)
if [[ -z $cidr ]]; then
@@ -106,7 +105,9 @@ load helpers
# remote IP is not 127.0.0.1 (podman PR #9052).
# We could get more parseable output by using $NCAT_REMOTE_ADDR,
# but busybox nc doesn't support that.
- run_podman run -d --userns=keep-id $network_arg -p 127.0.0.1:$myport:$myport \
+ userns="--userns=keep-id"
+ is_rootless || userns="--uidmap=0:1111111:65536 --gidmap=0:1111111:65536"
+ run_podman run -d ${userns} $network_arg -p 127.0.0.1:$myport:$myport \
$IMAGE nc -l -n -v -p $myport
cid="$output"