link executor tests: test vlan dependency learning
This commit is contained in:
parent
badcccaa5b
commit
8e7c935cdf
2 changed files with 19 additions and 2 deletions
|
@ -56,6 +56,8 @@ up|down)
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
depend)
|
depend)
|
||||||
echo "$IF_VLAN_RAW_DEVICE"
|
if is_vlan; then
|
||||||
|
echo "$IF_VLAN_RAW_DEVICE"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -10,7 +10,9 @@ tests_init \
|
||||||
vlan_explicit_up \
|
vlan_explicit_up \
|
||||||
vlan_explicit_down \
|
vlan_explicit_down \
|
||||||
vlan_guessed_up \
|
vlan_guessed_up \
|
||||||
vlan_guessed_down
|
vlan_guessed_down \
|
||||||
|
vlan_explicit_depend \
|
||||||
|
vlan_guessed_depend
|
||||||
|
|
||||||
up_body() {
|
up_body() {
|
||||||
export IFACE=lo PHASE=up MOCK=echo
|
export IFACE=lo PHASE=up MOCK=echo
|
||||||
|
@ -55,3 +57,16 @@ vlan_guessed_down_body() {
|
||||||
atf_check -s exit:0 -o match:'ip link delete link eth0 name eth0.8 type vlan id 8' \
|
atf_check -s exit:0 -o match:'ip link delete link eth0 name eth0.8 type vlan id 8' \
|
||||||
${EXECUTOR}
|
${EXECUTOR}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vlan_explicit_depend_body() {
|
||||||
|
export IFACE=servers PHASE=up MOCK=echo \
|
||||||
|
IF_VLAN_RAW_DEVICE="eth0" IF_VLAN_ID="123"
|
||||||
|
atf_check -s exit:0 -o match:'eth0' \
|
||||||
|
${EXECUTOR}
|
||||||
|
}
|
||||||
|
|
||||||
|
vlan_guessed_depend_body() {
|
||||||
|
export IFACE=eth0.8 PHASE=depend
|
||||||
|
atf_check -s exit:0 -o match:'eth0' \
|
||||||
|
${EXECUTOR}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue