tests: add fixture & test for VRF topology learning
This commit is contained in:
parent
ba98705c8f
commit
2c37b22d70
4 changed files with 18 additions and 1 deletions
|
@ -23,6 +23,9 @@ post-down)
|
|||
[ -n "$IF_VRF_TABLE" ] && handle_init "del"
|
||||
exit 0
|
||||
;;
|
||||
depend)
|
||||
echo "$IF_VRF_MEMBER"
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
|
|
7
tests/fixtures/vrf.interfaces
vendored
Normal file
7
tests/fixtures/vrf.interfaces
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
iface vrf-red
|
||||
vrf-table 1
|
||||
|
||||
auto eth0
|
||||
iface eth0
|
||||
use dhcp
|
||||
vrf-member vrf-red
|
|
@ -18,7 +18,8 @@ tests_init \
|
|||
learned_executor \
|
||||
inheritance_0 \
|
||||
inheritance_1 \
|
||||
implicit_vlan
|
||||
implicit_vlan \
|
||||
vrf_dependency
|
||||
|
||||
noargs_body() {
|
||||
atf_check -s exit:1 -e ignore ifquery -S/dev/null
|
||||
|
@ -112,3 +113,8 @@ implicit_vlan_body() {
|
|||
-o match:"use vlan" \
|
||||
ifquery -E $EXECUTORS -i $FIXTURES/vlan.interfaces eth0.8
|
||||
}
|
||||
|
||||
vrf_dependency_body() {
|
||||
atf_check -s exit:0 -o match:"requires vrf-red" \
|
||||
ifquery -E $EXECUTORS_LINUX -i $FIXTURES/vrf.interfaces eth0
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
PATH="$(atf_get_srcdir)/..:$(atf_get_srcdir)/../..:$PATH"
|
||||
FIXTURES="$(atf_get_srcdir)/fixtures"
|
||||
EXECUTORS="$(atf_get_srcdir)/executors"
|
||||
EXECUTORS_LINUX="$(atf_get_srcdir)/../executor-scripts/linux"
|
||||
|
||||
tests_init() {
|
||||
TESTS="$@"
|
||||
|
|
Loading…
Reference in a new issue