diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2023-01-25 15:36:26 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2023-01-25 14:47:22 +0000 |
commit | 6424b345be8c083e253aefa14a9f06328f949813 (patch) | |
tree | 9c27a8777ae831819ae21df9b2002e0bc1d73e1d /tests/setup_interfaces_test | |
parent | e3a6f3f0115ab533558dd69d8cfa2b194f8403e8 (diff) | |
download | alpine-conf-6424b345be8c083e253aefa14a9f06328f949813.zip |
setup-interfaces: add tests for auto
Diffstat (limited to 'tests/setup_interfaces_test')
-rwxr-xr-x | tests/setup_interfaces_test | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/setup_interfaces_test b/tests/setup_interfaces_test index 35dce72..4a611ab 100755 --- a/tests/setup_interfaces_test +++ b/tests/setup_interfaces_test @@ -12,7 +12,10 @@ init_tests \ setup_interfaces_interactive_br0 \ setup_interfaces_interactive_bond0 \ setup_interfaces_interactive_wlan0_psk \ - setup_interfaces_interactive_wlan0_open + setup_interfaces_interactive_wlan0_open \ + setup_interfaces_auto \ + setup_interfaces_auto_none \ + setup_interfaces_auto_restart setup_interfaces_usage_body() { test_usage setup-interfaces @@ -233,3 +236,24 @@ setup_interfaces_interactive_wlan0_open_body() { -o match:"Ip address for wlan0" \ setup-interfaces <answers } + +setup_interfaces_auto_body() { + init_env + create_fake_ifaces lo eth0 + atf_check -s exit:0 \ + setup-interfaces -a +} + +setup_interfaces_auto_none_body() { + init_env + atf_check -s exit:0 \ + setup-interfaces -a +} + +setup_interfaces_auto_restart_body() { + init_env + create_fake_ifaces lo eth0 + atf_check -s exit:0 \ + setup-interfaces -a -r + atf_check -o match:"status: started" rc-service networking status +} |