summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-05-18 19:44:05 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2022-05-18 19:45:25 +0000
commit9992890033a99cc65920607aa3bab67510ae20e0 (patch)
treeb3f0e523f84dd941bc212b55d9db1e0b4a254bf3 /tests
parentea29b6c763a3695595c1a6aa0c614e4127019817 (diff)
downloadalpine-conf-9992890033a99cc65920607aa3bab67510ae20e0.zip
tests: add test for setup-timezone -i
verify that it does not uninstall tzdata
Diffstat (limited to 'tests')
-rwxr-xr-xtests/setup_timezone_test13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/setup_timezone_test b/tests/setup_timezone_test
index 68ca961..4154c4e 100755
--- a/tests/setup_timezone_test
+++ b/tests/setup_timezone_test
@@ -4,6 +4,7 @@
init_tests \
setup_timezone_usage \
setup_timezone_copy \
+ setup_timezone_install \
setup_timezone_usage_body() {
test_usage setup-timezone
@@ -20,3 +21,15 @@ setup_timezone_copy_body() {
setup-timezone Europe/Oslo
}
+setup_timezone_install_body() {
+ init_env
+ mkdir -p usr/share/zoneinfo/Europe
+ touch usr/share/zoneinfo/Europe/Oslo
+ atf_check -s exit:0 \
+ -o match:"apk add .*tzdata" \
+ -o not-match:"apk add.*--virtual" \
+ -o not-match:"apk del" \
+ -e empty \
+ setup-timezone -i Europe/Oslo
+}
+