tests: add ifupdown2 vrf configuration fixture, and some tests against it

This commit is contained in:
Ariadne Conill 2020-08-19 02:14:08 -06:00
parent cb03eb1ee9
commit 71290da711
2 changed files with 20 additions and 1 deletions

View file

@ -0,0 +1,7 @@
iface vrf-red
vrf-table 1
auto eth0
iface eth0
use dhcp
vrf vrf-red

View file

@ -19,7 +19,9 @@ tests_init \
inheritance_0 \
inheritance_1 \
implicit_vlan \
vrf_dependency
vrf_dependency \
vrf_ifupdown2_rewrite \
vrf_ifupdown2_dependency
noargs_body() {
atf_check -s exit:1 -e ignore ifquery -S/dev/null
@ -118,3 +120,13 @@ vrf_dependency_body() {
atf_check -s exit:0 -o match:"requires vrf-red" \
ifquery -E $EXECUTORS_LINUX -i $FIXTURES/vrf.interfaces eth0
}
vrf_ifupdown2_rewrite_body() {
atf_check -s exit:0 -o match:"vrf-member vrf-red" \
ifquery -E $EXECUTORS -i $FIXTURES/vrf-ifupdown2.interfaces eth0
}
vrf_ifupdown2_dependency_body() {
atf_check -s exit:0 -o match:"requires vrf-red" \
ifquery -E $EXECUTORS_LINUX -i $FIXTURES/vrf-ifupdown2.interfaces eth0
}