tests: add tests for link executor
This commit is contained in:
parent
08805f7de3
commit
5f078537bf
3 changed files with 25 additions and 0 deletions
|
@ -5,3 +5,5 @@ test_suite('ifupdown-ng')
|
||||||
atf_test_program{name='ifquery_test'}
|
atf_test_program{name='ifquery_test'}
|
||||||
atf_test_program{name='ifup_test'}
|
atf_test_program{name='ifup_test'}
|
||||||
atf_test_program{name='ifdown_test'}
|
atf_test_program{name='ifdown_test'}
|
||||||
|
|
||||||
|
include('linux/Kyuafile')
|
||||||
|
|
5
tests/linux/Kyuafile
Normal file
5
tests/linux/Kyuafile
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
syntax(2)
|
||||||
|
|
||||||
|
test_suite('ifupdown-ng')
|
||||||
|
|
||||||
|
atf_test_program{name='link_test'}
|
18
tests/linux/link_test
Executable file
18
tests/linux/link_test
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env atf-sh
|
||||||
|
|
||||||
|
. $(atf_get_srcdir)/../test_env.sh
|
||||||
|
EXECUTOR="$(atf_get_srcdir)/../../executor-scripts/linux/link"
|
||||||
|
|
||||||
|
tests_init up down
|
||||||
|
|
||||||
|
up_body() {
|
||||||
|
export IFACE=lo PHASE=up MOCK=echo
|
||||||
|
atf_check -s exit:0 -o match:'ip link set up dev lo' \
|
||||||
|
${EXECUTOR}
|
||||||
|
}
|
||||||
|
|
||||||
|
down_body() {
|
||||||
|
export IFACE=lo PHASE=down MOCK=echo
|
||||||
|
atf_check -s exit:0 -o match:'ip link set down dev lo' \
|
||||||
|
${EXECUTOR}
|
||||||
|
}
|
Loading…
Reference in a new issue