tests: add test for mock dependency generator

This commit is contained in:
Ariadne Conill 2020-07-28 13:48:53 -06:00
parent fb5ff4eac2
commit c97594b89b
2 changed files with 9 additions and 1 deletions

View file

@ -0,0 +1,2 @@
iface br0
use mock-dependency-generator

View file

@ -12,7 +12,8 @@ tests_init \
use_dhcp \ use_dhcp \
state_query_home \ state_query_home \
state_query_work \ state_query_work \
state_print state_print \
learned_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
@ -69,3 +70,8 @@ state_print_body() {
atf_check -s exit:0 -o match:"wlan0=work" \ atf_check -s exit:0 -o match:"wlan0=work" \
ifquery -S $FIXTURES/alias-work.ifstate -i $FIXTURES/alias-home-work.interfaces -s ifquery -S $FIXTURES/alias-work.ifstate -i $FIXTURES/alias-home-work.interfaces -s
} }
learned_dependency_body() {
atf_check -s exit:0 -o match:"requires eth0 eth1 eth2 eth3 eth4" \
ifquery -E $EXECUTORS -i $FIXTURES/mock-dependency-generator.interfaces br0
}