From 39d6d3c8d63985b0ad44235ff2b322ce3be63cbc Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 25 Jan 2023 15:10:28 +0100 Subject: tests: setup-alpine: test answerfile from https ref https://gitlab.alpinelinux.org/alpine/alpine-conf/-/merge_requests/136 --- tests/setup_alpine_test | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) 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 +} + -- cgit v1.2.3