summaryrefslogtreecommitdiff
path: root/tests/setup_alpine_test
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2023-01-24 12:08:23 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2023-01-24 12:07:31 +0000
commit04e4624ab54a2c26e03e9df960e1640ceb150ddc (patch)
treeea2832ca6958bcbacbfe627f9c90e526662919b1 /tests/setup_alpine_test
parentd0cb8a74038ae77a35fb52752d8977bae87a6614 (diff)
downloadalpine-conf-04e4624ab54a2c26e03e9df960e1640ceb150ddc.zip
setup-*: use fake apk instead of $MOCK apk
Diffstat (limited to 'tests/setup_alpine_test')
-rwxr-xr-xtests/setup_alpine_test29
1 files changed, 28 insertions, 1 deletions
diff --git a/tests/setup_alpine_test b/tests/setup_alpine_test
index 11fce8e..dc84291 100755
--- a/tests/setup_alpine_test
+++ b/tests/setup_alpine_test
@@ -7,7 +7,8 @@ init_tests \
setup_alpine_create_answerfile \
setup_alpine_kvm_clock \
setup_alpine_restart_network \
- setup_alpine_answerfile_none
+ setup_alpine_answerfile_none \
+ setup_alpine_answerfile_apkcache
export WGETCONTENT="https://mirror.example.com"
setup_alpine_usage_body() {
@@ -139,3 +140,29 @@ setup_alpine_answerfile_none_body() {
done
}
+setup_alpine_answerfile_apkcache_body() {
+ init_env
+
+ cat >opts<<-EOF
+ KEYMAPOPTS=none
+ HOSTNAMEOPTS=alpine
+ INTERFACESOPTS=none
+ DNSOPTS=none
+ TIMEZONEOPTS=none
+ PROXYOPTS=none
+ NTPOPTS=none
+ APKREPOSOPTS=none
+ USEROPTS=none
+ SSHDOPTS=none
+ DISKOPTS=none
+ LBUOPTS=none
+ APKCACHEOPTS="media/LABEL=APKOVL/cache"
+ EOF
+ atf_check -s exit:0 \
+ -o match:"apk cache" \
+ setup-alpine -e -f opts
+ if ! [ -L etc/apk/cache ]; then
+ atf_fail "etc/apk/cache was not created"
+ fi
+}
+