summaryrefslogtreecommitdiff
path: root/tests/setup_apkrepos_test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/setup_apkrepos_test')
-rwxr-xr-xtests/setup_apkrepos_test20
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/setup_apkrepos_test b/tests/setup_apkrepos_test
index f70b400..1998dbe 100755
--- a/tests/setup_apkrepos_test
+++ b/tests/setup_apkrepos_test
@@ -7,7 +7,8 @@ init_tests \
setup_apkrepos_https \
setup_apkrepos_random \
setup_apkrepos_first \
- setup_apkrepos_fastest
+ setup_apkrepos_fastest \
+ setup_apkrepos_network_failure
setup_apkrepos_usage_body() {
test_usage setup-apkrepos
@@ -55,3 +56,20 @@ setup_apkrepos_fastest_body() {
-o match:"Added mirror a[0-9].example.com" \
setup-apkrepos -f
}
+
+setup_apkrepos_network_failure_body() {
+ init_env
+ MIRRORS_URL=https://example.com/fail \
+ atf_check -s not-exit:0 \
+ -o match:"Finding" \
+ -e match:"Warning! No mirror found" \
+ setup-apkrepos -f
+ MIRRORS_URL=https://example.com/fail \
+ atf_check -s not-exit:0 \
+ -e match:"Warning" \
+ setup-apkrepos -r
+ MIRRORS_URL=https://example.com/fail \
+ atf_check -s not-exit:0 \
+ -e match:"Warning! No mirror found" \
+ setup-apkrepos -1
+}