tests: add ifquery test for gre dependency learning
This commit is contained in:
parent
d31f8614a3
commit
6d2ae938d1
2 changed files with 19 additions and 1 deletions
12
tests/fixtures/gre.interfaces
vendored
Normal file
12
tests/fixtures/gre.interfaces
vendored
Normal 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
|
|
@ -28,7 +28,8 @@ tests_init \
|
||||||
tunnel_legacy_dependency \
|
tunnel_legacy_dependency \
|
||||||
tunnel_legacy_rewrite \
|
tunnel_legacy_rewrite \
|
||||||
tunnel_ifupdown2_dependency \
|
tunnel_ifupdown2_dependency \
|
||||||
tunnel_ifupdown2_rewrite
|
tunnel_ifupdown2_rewrite \
|
||||||
|
gre_dependency
|
||||||
|
|
||||||
noargs_body() {
|
noargs_body() {
|
||||||
atf_check -s exit:1 -e ignore ifquery -S/dev/null
|
atf_check -s exit:1 -e ignore ifquery -S/dev/null
|
||||||
|
@ -180,3 +181,8 @@ tunnel_ifupdown2_rewrite_body() {
|
||||||
-o match:"tunnel-ttl 255" \
|
-o match:"tunnel-ttl 255" \
|
||||||
ifquery -E $EXECUTORS_LINUX -i $FIXTURES/tunnel-ifupdown2.interfaces tun0
|
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
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue