summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2023-01-25 15:10:28 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2023-01-25 14:47:22 +0000
commit39d6d3c8d63985b0ad44235ff2b322ce3be63cbc (patch)
tree144be22418138d0552f623d9674f6606ea1b74f1
parent6424b345be8c083e253aefa14a9f06328f949813 (diff)
downloadalpine-conf-39d6d3c8d63985b0ad44235ff2b322ce3be63cbc.zip
tests: setup-alpine: test answerfile from https
ref https://gitlab.alpinelinux.org/alpine/alpine-conf/-/merge_requests/136
-rwxr-xr-xtests/setup_alpine_test27
1 files changed, 26 insertions, 1 deletions
diff --git a/tests/setup_alpine_test b/tests/setup_alpine_test
index dc84291..898ffd7 100755
--- a/tests/setup_alpine_test
+++ b/tests/setup_alpine_test
@@ -8,7 +8,8 @@ init_tests \
setup_alpine_kvm_clock \
setup_alpine_restart_network \
setup_alpine_answerfile_none \
- setup_alpine_answerfile_apkcache
+ setup_alpine_answerfile_apkcache \
+ setup_alpine_answerfile_network
export WGETCONTENT="https://mirror.example.com"
setup_alpine_usage_body() {
@@ -166,3 +167,27 @@ setup_alpine_answerfile_apkcache_body() {
fi
}
+setup_alpine_answerfile_network_body() {
+ init_env
+ cat >opts<<-EOF
+ KEYMAPOPTS=none
+ HOSTNAMEOPTS=myname
+ INTERFACESOPTS=none
+ DNSOPTS=none
+ TIMEZONEOPTS=none
+ PROXYOPTS=none
+ NTPOPTS=none
+ APKREPOSOPTS=none
+ USEROPTS=none
+ SSHDOPTS=none
+ DISKOPTS=none
+ LBUOPTS=none
+ APKCACHEOPTS=none
+ EOF
+ WGETCONTENT="$(cat opts)" atf_check -s exit:0 \
+ -o match:"apk add" \
+ setup-alpine -e -f https://example.com/answers
+
+ atf_check -o match:"myname" cat etc/hostname
+}
+