tests: add tests for learned executors
This commit is contained in:
parent
2be1fa5b0b
commit
2fecbfc7e9
3 changed files with 25 additions and 3 deletions
|
@ -16,7 +16,8 @@ tests_init \
|
|||
alias_eth0_work \
|
||||
bonded_bridge \
|
||||
learned_dependency \
|
||||
learned_dependency_2
|
||||
learned_dependency_2 \
|
||||
learned_executor
|
||||
|
||||
noargs_body() {
|
||||
atf_check -s exit:1 -e ignore ifdown -S/dev/null
|
||||
|
@ -123,3 +124,11 @@ learned_dependency_2_body() {
|
|||
-E $EXECUTORS \
|
||||
-i $FIXTURES/mock-dependency-generator-2.interfaces br0
|
||||
}
|
||||
|
||||
learned_executor_body() {
|
||||
atf_check -s exit:0 -o ignore \
|
||||
-e match:"attempting to run mock executor" \
|
||||
ifdown -n -S $FIXTURES/mock-dependency-generator-2.ifstate \
|
||||
-E $EXECUTORS \
|
||||
-i $FIXTURES/mock-dependency-generator-2.interfaces br0
|
||||
}
|
||||
|
|
|
@ -14,7 +14,8 @@ tests_init \
|
|||
state_query_work \
|
||||
state_print \
|
||||
learned_dependency \
|
||||
learned_dependency_2
|
||||
learned_dependency_2 \
|
||||
learned_executor
|
||||
|
||||
noargs_body() {
|
||||
atf_check -s exit:1 -e ignore ifquery -S/dev/null
|
||||
|
@ -81,3 +82,8 @@ learned_dependency_2_body() {
|
|||
atf_check -s exit:0 -o match:"requires bond0" \
|
||||
ifquery -E $EXECUTORS -i $FIXTURES/mock-dependency-generator-2.interfaces br0
|
||||
}
|
||||
|
||||
learned_executor_body() {
|
||||
atf_check -s exit:0 -o match:"use mock" \
|
||||
ifquery -E $EXECUTORS -i $FIXTURES/mock-dependency-generator-2.interfaces br0
|
||||
}
|
||||
|
|
|
@ -16,7 +16,8 @@ tests_init \
|
|||
alias_eth0_work \
|
||||
bonded_bridge \
|
||||
learned_dependency \
|
||||
learned_dependency_2
|
||||
learned_dependency_2 \
|
||||
learned_executor
|
||||
|
||||
noargs_body() {
|
||||
atf_check -s exit:1 -e ignore ifup -S/dev/null
|
||||
|
@ -116,3 +117,9 @@ learned_dependency_2_body() {
|
|||
-e match:"eth1" \
|
||||
ifup -n -S/dev/null -E $EXECUTORS -i $FIXTURES/mock-dependency-generator-2.interfaces br0
|
||||
}
|
||||
|
||||
learned_executor_body() {
|
||||
atf_check -s exit:0 -o ignore \
|
||||
-e match:"attempting to run mock executor" \
|
||||
ifup -n -S/dev/null -E $EXECUTORS -i $FIXTURES/mock-dependency-generator-2.interfaces br0
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue