diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2023-01-24 12:40:20 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2023-01-24 13:12:01 +0100 |
commit | 4c76a50f6ee44a37f33c135569efb54fa2b5ce72 (patch) | |
tree | fa5a59149fac87aa1cd91aba7f6b6421bf38d3e1 /tests/setup_apkrepos_test | |
parent | 04e4624ab54a2c26e03e9df960e1640ceb150ddc (diff) | |
download | alpine-conf-4c76a50f6ee44a37f33c135569efb54fa2b5ce72.zip |
tests: add test for interactive setup-apkrepos
Diffstat (limited to 'tests/setup_apkrepos_test')
-rwxr-xr-x | tests/setup_apkrepos_test | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/setup_apkrepos_test b/tests/setup_apkrepos_test index 1998dbe..d505d46 100755 --- a/tests/setup_apkrepos_test +++ b/tests/setup_apkrepos_test @@ -8,7 +8,8 @@ init_tests \ setup_apkrepos_random \ setup_apkrepos_first \ setup_apkrepos_fastest \ - setup_apkrepos_network_failure + setup_apkrepos_network_failure \ + setup_apkrepos_interactive setup_apkrepos_usage_body() { test_usage setup-apkrepos @@ -73,3 +74,13 @@ setup_apkrepos_network_failure_body() { -e match:"Warning! No mirror found" \ setup-apkrepos -1 } + +setup_apkrepos_interactive_body() { + init_env + export WGETCONTENT="$(seq 0 9 | awk '{print "https://a" $0 ".example.com"}')" + echo "1" > answers + atf_check -s exit:0 \ + -o match:"Enter mirror number" \ + setup-apkrepos < answers +} + |