summaryrefslogtreecommitdiff
path: root/tests/setup_apkrepos_test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/setup_apkrepos_test')
-rwxr-xr-xtests/setup_apkrepos_test10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/setup_apkrepos_test b/tests/setup_apkrepos_test
index bf57b4f..bb152c0 100755
--- a/tests/setup_apkrepos_test
+++ b/tests/setup_apkrepos_test
@@ -3,7 +3,8 @@
. $(atf_get_srcdir)/test_env.sh
init_tests \
setup_apkrepos_usage \
- setup_apkrepos_https
+ setup_apkrepos_https \
+ setup_apkrepos_random
setup_apkrepos_usage_body() {
test_usage setup-apkrepos
@@ -20,3 +21,10 @@ setup_apkrepos_https_body() {
grep -q 'https://example.com' etc/apk/repositories || atf_fail "example.com was not added to /etc/apk/repositories"
}
+setup_apkrepos_random_body() {
+ init_env
+ export WGETCONTENT="$(seq 0 9 | awk '{print "https://a" $0 ".example.com"}')"
+ atf_check -s exit:0 \
+ -o match:"Added mirror a[0-9].example.com" \
+ setup-apkrepos -r
+}