tests: add ifquery test for gre dependency learning

This commit is contained in:
Ariadne Conill 2020-08-20 02:33:51 -06:00
parent d31f8614a3
commit 6d2ae938d1
2 changed files with 19 additions and 1 deletions

12
tests/fixtures/gre.interfaces vendored Normal file
View file

@ -0,0 +1,12 @@
auto tun0
iface tun0
gre-local 203.0.113.2
gre-remote 203.0.113.1
gre-dev eth0
gre-ttl 255
gre-flags nopmtudisc ignore-df
address 203.0.113.10/30
gateway 203.0.113.9
iface eth0
address 203.0.113.2/30

View file

@ -28,7 +28,8 @@ tests_init \
tunnel_legacy_dependency \
tunnel_legacy_rewrite \
tunnel_ifupdown2_dependency \
tunnel_ifupdown2_rewrite
tunnel_ifupdown2_rewrite \
gre_dependency
noargs_body() {
atf_check -s exit:1 -e ignore ifquery -S/dev/null
@ -180,3 +181,8 @@ tunnel_ifupdown2_rewrite_body() {
-o match:"tunnel-ttl 255" \
ifquery -E $EXECUTORS_LINUX -i $FIXTURES/tunnel-ifupdown2.interfaces tun0
}
gre_dependency_body() {
atf_check -s exit:0 -o match:"requires eth0" \
ifquery -E $EXECUTORS_LINUX -i $FIXTURES/gre.interfaces tun0
}