1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-02 08:56:07 +00:00

test(installer): check that the settings are copied from the template

The test checked only wvc_ensure_settings' exit status and then wrote
the settings file itself: a function that copied nothing passed. It now
checks the file's contents after the copy.
This commit is contained in:
catborise 2026-11-08 20:52:01 +03:00
parent c533517beb
commit 85c2cd3d02

View file

@ -28,6 +28,7 @@ check "fails when python cannot run" "! wvc_ensure_secret_key '$tmp/data' no-suc
# wvc_ensure_settings: creates once, keeps on re-run
echo "TEMPLATE" > "$tmp/tpl"
check "ensure_settings returns 0 on create" "wvc_ensure_settings '$tmp/tpl' '$tmp/settings.py'"
check "settings created from the template" "[ \"\$(cat '$tmp/settings.py')\" = TEMPLATE ]"
echo "EDITED" > "$tmp/settings.py"
check "ensure_settings returns 1 when present" "! wvc_ensure_settings '$tmp/tpl' '$tmp/settings.py'"
check "existing settings kept" "[ \"\$(cat '$tmp/settings.py')\" = EDITED ]"