diff --git a/tests/fixtures/vrf-ifupdown2.interfaces b/tests/fixtures/vrf-ifupdown2.interfaces new file mode 100644 index 0000000..242cba5 --- /dev/null +++ b/tests/fixtures/vrf-ifupdown2.interfaces @@ -0,0 +1,7 @@ +iface vrf-red + vrf-table 1 + +auto eth0 +iface eth0 + use dhcp + vrf vrf-red diff --git a/tests/ifquery_test b/tests/ifquery_test index 0b557d7..f6afe13 100755 --- a/tests/ifquery_test +++ b/tests/ifquery_test @@ -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 +}