diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-07-15 16:38:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-15 16:38:36 -0400 |
commit | 6dcff5c32b4ed68378c6df7c6b0fd04a902dc405 (patch) | |
tree | 1b20819b46e2fee91f76ad6a017b91d6bea529b6 /test/system/200-pod.bats | |
parent | 9051546c4df40b611ca09b02ae57ae6e8fb72c94 (diff) | |
parent | c58127602e57ad489bd951760026dccd7593eeaf (diff) | |
download | podman-6dcff5c32b4ed68378c6df7c6b0fd04a902dc405.tar.gz podman-6dcff5c32b4ed68378c6df7c6b0fd04a902dc405.tar.bz2 podman-6dcff5c32b4ed68378c6df7c6b0fd04a902dc405.zip |
Merge pull request #6975 from baude/rootlessIPMAC
Error on rootless mac and ip addresses
Diffstat (limited to 'test/system/200-pod.bats')
-rw-r--r-- | test/system/200-pod.bats | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/system/200-pod.bats b/test/system/200-pod.bats index 0e9d9132e..0ad555305 100644 --- a/test/system/200-pod.bats +++ b/test/system/200-pod.bats @@ -165,9 +165,13 @@ function random_ip() { # Create a pod with all the desired options # FIXME: --ip=$ip fails: # Error adding network: failed to allocate all requested IPs + local mac_option="--mac-address=$mac" + if is_rootless; then + mac_option= + fi run_podman pod create --name=mypod \ --pod-id-file=$pod_id_file \ - --mac-address=$mac \ + $mac_option \ --hostname=$hostname \ --add-host "$add_host_n:$add_host_ip" \ --dns "$dns_server" \ @@ -181,7 +185,7 @@ function random_ip() { is "$(<$pod_id_file)" "$pod_id" "contents of pod-id-file" # Check each of the options - if ! is_rootless; then + if [ -n "$mac_option" ]; then run_podman run --rm --pod mypod $IMAGE ip link show # 'ip' outputs hex in lower-case, ${expr,,} converts UC to lc is "$output" ".* link/ether ${mac,,} " "requested MAC address was set" |