1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-11 12:46:49 +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.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea
This commit is contained in:
catborise 2026-11-08 20:52:01 +03:00
parent 2ee3e5ddad
commit 91f8d83bc1

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 ]"