tests: add vlan-complex.interface and ifquery test for it
This commit is contained in:
parent
f17fa09944
commit
050ab77bd3
2 changed files with 31 additions and 1 deletions
18
tests/fixtures/vlan-complex.interfaces
vendored
Normal file
18
tests/fixtures/vlan-complex.interfaces
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
# From Alpine issue #11885.
|
||||
iface lo inet loopback
|
||||
|
||||
auto eth0
|
||||
iface eth0
|
||||
address 1.2.3.4/24
|
||||
address abcd:ef12:3456:3::4/64
|
||||
mtu 8000
|
||||
|
||||
auto servers
|
||||
iface servers
|
||||
address 1.2.10.4/24
|
||||
gateway 1.2.10.1
|
||||
address abcd:ef12:3456:10::4/64
|
||||
gateway abcd:ef12:3456:10::1
|
||||
mtu 8000
|
||||
vlan-raw-device eth0
|
||||
vlan_id 5
|
|
@ -32,7 +32,8 @@ tests_init \
|
|||
tunnel_ifupdown2_rewrite \
|
||||
gre_dependency \
|
||||
vlan_explicit_learned_dependency \
|
||||
vlan_guessed_learned_dependency
|
||||
vlan_guessed_learned_dependency \
|
||||
vlan_complex_learned_dependency
|
||||
|
||||
noargs_body() {
|
||||
atf_check -s exit:1 -e ignore ifquery -S/dev/null
|
||||
|
@ -206,3 +207,14 @@ vlan_guessed_learned_dependency_body() {
|
|||
-o match:"use vlan" \
|
||||
ifquery -E $EXECUTORS_LINUX -i $FIXTURES/vlan.interfaces eth0.8
|
||||
}
|
||||
|
||||
vlan_complex_learned_dependency_body() {
|
||||
atf_check -s exit:0 -o match:"requires eth0" \
|
||||
-o match:"use vlan" \
|
||||
-o match:"address 1.2.10.4/24" \
|
||||
-o match:"gateway 1.2.10.1" \
|
||||
-o match:"address abcd:ef12:3456:10::4/64" \
|
||||
-o match:"gateway abcd:ef12:3456:10::1" \
|
||||
-o match:"vlan-raw-device eth0" \
|
||||
ifquery -E $EXECUTORS_LINUX -i $FIXTURES/vlan-complex.interfaces servers
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue