diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2022-07-05 17:37:53 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2022-07-05 17:37:53 +0200 |
commit | 8ffc2ca8735b2d670614dea9bcccb1211ad7d213 (patch) | |
tree | 3954fd43361dc95dbea06dc18c5b246078ce490a /tests | |
parent | 9d4574d45d2544b94d28244441ea8042da090fbb (diff) | |
download | alpine-conf-8ffc2ca8735b2d670614dea9bcccb1211ad7d213.zip |
setup-interfaces: mock apk add and test that vlan gets installed
test that vlan gets installed
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/setup_interfaces_test | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/setup_interfaces_test b/tests/setup_interfaces_test index fc652c1..c09968c 100755 --- a/tests/setup_interfaces_test +++ b/tests/setup_interfaces_test @@ -3,7 +3,8 @@ . $(atf_get_srcdir)/test_env.sh init_tests \ setup_interfaces_usage \ - setup_interfaces_interactive_dhcp + setup_interfaces_interactive_dhcp \ + setup_interfaces_interactive_vlan setup_interfaces_usage_body() { test_usage setup-interfaces @@ -34,3 +35,21 @@ setup_interfaces_interactive_dhcp_body() { -o match:"Available interfaces are: eth0" \ setup-interfaces <answers } + +setup_interfaces_interactive_vlan_body() { + init_env + create_fake_ifaces lo eth0 + ( + # Which one do you want to initialize? (or '?' or 'done') [eth0] + echo eth0.5 + # Ip address for eth0.5? (or 'dhcp', 'none', '?') [dhcp] + echo dhcp + # Which one do you want to initialize? (or '?' or 'done') [eth0] + echo done + # Do you want to do any manual network configuration? (y/n) [n] + echo n + )>answers + atf_check -s exit:0 \ + -o match:"apk add.*vlan" \ + setup-interfaces <answers +} |