diff --git a/tests/fixtures/mock-dependency-generator.interfaces b/tests/fixtures/mock-dependency-generator.interfaces new file mode 100644 index 0000000..d07127f --- /dev/null +++ b/tests/fixtures/mock-dependency-generator.interfaces @@ -0,0 +1,2 @@ +iface br0 + use mock-dependency-generator diff --git a/tests/ifquery_test b/tests/ifquery_test index 52318f5..91c1380 100755 --- a/tests/ifquery_test +++ b/tests/ifquery_test @@ -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 +}