tests: add ppp executor tests
This commit is contained in:
parent
472319b847
commit
c2465344d5
2 changed files with 23 additions and 0 deletions
|
@ -7,3 +7,4 @@ atf_test_program{name='ipv6-ra_test'}
|
||||||
atf_test_program{name='dhcp_test'}
|
atf_test_program{name='dhcp_test'}
|
||||||
atf_test_program{name='static_test'}
|
atf_test_program{name='static_test'}
|
||||||
atf_test_program{name='vrf_test'}
|
atf_test_program{name='vrf_test'}
|
||||||
|
atf_test_program{name='ppp_test'}
|
||||||
|
|
22
tests/linux/ppp_test
Executable file
22
tests/linux/ppp_test
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
#!/usr/bin/env atf-sh
|
||||||
|
|
||||||
|
. $(atf_get_srcdir)/../test_env.sh
|
||||||
|
EXECUTOR="$(atf_get_srcdir)/../../executor-scripts/linux/ppp"
|
||||||
|
|
||||||
|
tests_init \
|
||||||
|
bringup \
|
||||||
|
teardown \
|
||||||
|
|
||||||
|
bringup_body() {
|
||||||
|
export MOCK=echo IFACE=ppp0 PHASE=pre-up IF_PPP_PROVIDER=someisp
|
||||||
|
atf_check -s exit:0 \
|
||||||
|
-o match:'pon someisp' \
|
||||||
|
${EXECUTOR}
|
||||||
|
}
|
||||||
|
|
||||||
|
teardown_body() {
|
||||||
|
export MOCK=echo IFACE=ppp0 PHASE=post-down IF_PPP_PROVIDER=someisp
|
||||||
|
atf_check -s exit:0 \
|
||||||
|
-o match:'poff someisp' \
|
||||||
|
${EXECUTOR}
|
||||||
|
}
|
Loading…
Reference in a new issue