tests: add test for mock dependency generator
This commit is contained in:
parent
fb5ff4eac2
commit
c97594b89b
2 changed files with 9 additions and 1 deletions
2
tests/fixtures/mock-dependency-generator.interfaces
vendored
Normal file
2
tests/fixtures/mock-dependency-generator.interfaces
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
iface br0
|
||||
use mock-dependency-generator
|
|
@ -12,7 +12,8 @@ tests_init \
|
|||
use_dhcp \
|
||||
state_query_home \
|
||||
state_query_work \
|
||||
state_print
|
||||
state_print \
|
||||
learned_dependency
|
||||
|
||||
noargs_body() {
|
||||
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" \
|
||||
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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue