summaryrefslogtreecommitdiff
path: root/tests/setup_alpine_test
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-06-28 18:17:32 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2022-07-01 10:15:32 +0000
commite13c60002f7fda9c7e0f631b0b2837898a23b9b6 (patch)
treef0fe122cf10a31c865c53e89ed423d361b9c4677 /tests/setup_alpine_test
parent02c9552169c12e921d2f99a2a2ce7b8da7bf0500 (diff)
downloadalpine-conf-e13c60002f7fda9c7e0f631b0b2837898a23b9b6.zip
setup-alpine: update generated answerfile and add test
test that the generated answerfile actually is interactive
Diffstat (limited to 'tests/setup_alpine_test')
-rwxr-xr-xtests/setup_alpine_test22
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/setup_alpine_test b/tests/setup_alpine_test
index 4699df9..22555ee 100755
--- a/tests/setup_alpine_test
+++ b/tests/setup_alpine_test
@@ -3,7 +3,8 @@
. $(atf_get_srcdir)/test_env.sh
init_tests \
setup_alpine_usage \
- setup_alpine_quick
+ setup_alpine_quick \
+ setup_alpine_create_answerfile
setup_alpine_usage_body() {
test_usage setup-alpine
@@ -17,3 +18,22 @@ setup_alpine_quick_body() {
-e empty \
setup-alpine -q
}
+
+setup_alpine_create_answerfile_body() {
+ init_env
+ atf_check -s exit:0 \
+ -o match:"Answer file answers has been created" \
+ setup-alpine -c answers
+
+ mkdir -p usr/share/zoneinfo/
+ touch usr/share/zoneinfo/UTC
+
+ atf_check -s exit:0 \
+ -o match:"Starting hostname" \
+ -o match:"Starting mdev" \
+ -o match:"Added mirror" \
+ -o match:"adduser" \
+ -o match:"apk add" \
+ setup-alpine -f answers
+}
+