summaryrefslogtreecommitdiff
path: root/test/system/200-pod.bats
diff options
context:
space:
mode:
Diffstat (limited to 'test/system/200-pod.bats')
-rw-r--r--test/system/200-pod.bats8
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"