summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-11-21 12:23:33 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2022-11-21 12:31:15 +0100
commita105b5a13eb56f94bfad0eb28f2e73eafd98b671 (patch)
tree96d830ffe9b963592009b15ff7ae600ffdc27e65
parent6a6db15345350a526c06d3bdb31e395a87755a07 (diff)
downloadalpine-conf-a105b5a13eb56f94bfad0eb28f2e73eafd98b671.zip
setup-apkrepos: add test for -1
-rwxr-xr-xtests/setup_apkrepos_test11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/setup_apkrepos_test b/tests/setup_apkrepos_test
index bb152c0..26d9d76 100755
--- a/tests/setup_apkrepos_test
+++ b/tests/setup_apkrepos_test
@@ -4,7 +4,8 @@
init_tests \
setup_apkrepos_usage \
setup_apkrepos_https \
- setup_apkrepos_random
+ setup_apkrepos_random \
+ setup_apkrepos_first
setup_apkrepos_usage_body() {
test_usage setup-apkrepos
@@ -28,3 +29,11 @@ setup_apkrepos_random_body() {
-o match:"Added mirror a[0-9].example.com" \
setup-apkrepos -r
}
+
+setup_apkrepos_first_body() {
+ init_env
+ export WGETCONTENT="$(seq 0 9 | awk '{print "https://a" $0 ".example.com"}')"
+ atf_check -s exit:0 \
+ -o match:"Added mirror a0.example.com" \
+ setup-apkrepos -1
+}