tests: add tests for link executor

This commit is contained in:
Ariadne Conill 2020-07-26 03:48:37 -06:00
parent 08805f7de3
commit 5f078537bf
3 changed files with 25 additions and 0 deletions

18
tests/linux/link_test Executable file
View 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}
}