tests: add tests for auto interface skipping
This commit is contained in:
parent
ceb82f4fd2
commit
e754e836af
4 changed files with 34 additions and 1 deletions
3
tests/fixtures/teardown-dep-ordering.ifstate
vendored
Normal file
3
tests/fixtures/teardown-dep-ordering.ifstate
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
dummy=dummy 2
|
||||
bat=bat 2
|
||||
br=br 1
|
13
tests/fixtures/teardown-dep-ordering.interfaces
vendored
Normal file
13
tests/fixtures/teardown-dep-ordering.interfaces
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
auto dummy
|
||||
iface dummy
|
||||
link-type dummy
|
||||
|
||||
auto bat
|
||||
iface bat
|
||||
link-type dummy
|
||||
requires dummy
|
||||
|
||||
auto br
|
||||
iface br
|
||||
link-type dummy
|
||||
requires bat
|
|
@ -22,6 +22,7 @@ tests_init \
|
|||
deferred_teardown_1 \
|
||||
deferred_teardown_2 \
|
||||
deferred_teardown_3 \
|
||||
teardown_dep_ordering \
|
||||
regress_opt_f
|
||||
|
||||
noargs_body() {
|
||||
|
@ -172,6 +173,14 @@ deferred_teardown_3_body() {
|
|||
-i $FIXTURES/deferred-teardown-2.interfaces tun0 tun1 tun2 tun3
|
||||
}
|
||||
|
||||
teardown_dep_ordering_body() {
|
||||
atf_check -s exit:0 -o ignore \
|
||||
-e match:"skipping auto interface bat" \
|
||||
-e match:"skipping auto interface dummy" \
|
||||
ifdown -n -i $FIXTURES/teardown-dep-ordering.interfaces \
|
||||
-S $FIXTURES/teardown-dep-ordering.ifstate -E $EXECUTORS -a
|
||||
}
|
||||
|
||||
regress_opt_f_body() {
|
||||
atf_check -s exit:0 -o ignore -e ignore \
|
||||
ifdown -n -S $FIXTURES/vlan.ifstate -E $EXECUTORS -i $FIXTURES/vlan.interfaces -f eth0.8
|
||||
|
|
|
@ -18,7 +18,8 @@ tests_init \
|
|||
learned_dependency \
|
||||
learned_dependency_2 \
|
||||
learned_executor \
|
||||
implicit_vlan
|
||||
implicit_vlan \
|
||||
teardown_dep_ordering
|
||||
|
||||
noargs_body() {
|
||||
atf_check -s exit:1 -e ignore ifup -S/dev/null
|
||||
|
@ -131,3 +132,10 @@ implicit_vlan_body() {
|
|||
-e match:"attempting to run link executor" \
|
||||
ifup -n -S/dev/null -E $EXECUTORS -i $FIXTURES/vlan.interfaces eth0.8
|
||||
}
|
||||
|
||||
teardown_dep_ordering_body() {
|
||||
atf_check -s exit:0 -o ignore \
|
||||
-e match:"skipping auto interface bat" \
|
||||
-e match:"skipping auto interface dummy" \
|
||||
ifup -n -i $FIXTURES/teardown-dep-ordering.interfaces -E $EXECUTORS -a
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue