From 91f8d83bc1f00cdcf95d732ad1948905f38f6f35 Mon Sep 17 00:00:00 2001 From: catborise Date: Sun, 8 Nov 2026 20:52:01 +0300 Subject: [PATCH] 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 Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea --- webvirtcloud/tests/sh/install_lib.test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/webvirtcloud/tests/sh/install_lib.test.sh b/webvirtcloud/tests/sh/install_lib.test.sh index 36c8e1b8..2afab7bc 100755 --- a/webvirtcloud/tests/sh/install_lib.test.sh +++ b/webvirtcloud/tests/sh/install_lib.test.sh @@ -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 ]"