aboutsummaryrefslogtreecommitdiff
path: root/test/system/500-networking.bats
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-12-22 16:40:10 +0100
committerGitHub <noreply@github.com>2021-12-22 16:40:10 +0100
commit2aea0a5e9beb251dc1e8a0ab67fa1460c54194b9 (patch)
treea829e4a2519c0762325dce8809fa5001a098156e /test/system/500-networking.bats
parent3280204f727bb733b1c615cff68e8377a61eb185 (diff)
parent64ce6949f23b308a432e83ec46c99ba67777ee1e (diff)
downloadpodman-2aea0a5e9beb251dc1e8a0ab67fa1460c54194b9.tar.gz
podman-2aea0a5e9beb251dc1e8a0ab67fa1460c54194b9.tar.bz2
podman-2aea0a5e9beb251dc1e8a0ab67fa1460c54194b9.zip
Merge pull request #12375 from rhatdan/hosts
Use hosts public ip address in rootless containers
Diffstat (limited to 'test/system/500-networking.bats')
-rw-r--r--test/system/500-networking.bats3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/system/500-networking.bats b/test/system/500-networking.bats
index 4d36163d7..2b5ad44dc 100644
--- a/test/system/500-networking.bats
+++ b/test/system/500-networking.bats
@@ -139,10 +139,11 @@ load helpers
@test "podman run with slirp4ns assigns correct addresses to /etc/hosts" {
CIDR="$(random_rfc1918_subnet)"
+ IP=$(hostname -I | cut -f 1 -d " ")
local conname=con-$(random_string 10)
run_podman run --rm --network slirp4netns:cidr="${CIDR}.0/24" \
--name $conname --hostname $conname $IMAGE cat /etc/hosts
- is "$output" ".*${CIDR}.2 host.containers.internal" "host.containers.internal should be the cidr+2 address"
+ is "$output" ".*${IP} host.containers.internal" "host.containers.internal should be the cidr+2 address"
is "$output" ".*${CIDR}.100 $conname $conname" "$conname should be the cidr+100 address"
}