Model rendered lock fallback in diagnostics
This commit is contained in:
@@ -8,6 +8,7 @@ set -euo pipefail
|
||||
|
||||
repo_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
doctor="$repo_dir/config/dot/quickshell/scripts/panama-doctor"
|
||||
theme_helper="$repo_dir/config/dot/quickshell/scripts/panama-theme-apps"
|
||||
fixture_root="$repo_dir/tests/quickshell/fixtures/doctor"
|
||||
|
||||
fail() {
|
||||
@@ -148,11 +149,19 @@ check_status "$snapshot" desktop.hyprlock ok
|
||||
|
||||
printf '%s\n' '{"generated":false,"path":"/fixture-secret-wallpaper.jpg","fallback":true,"error":"fixture-secret-token"}' \
|
||||
>"$state_home/panama/hyprlock-status.json"
|
||||
# A linked source checkout contains the template; installation renders the
|
||||
# ignored machine-local fallback beside it. Model that installed state without
|
||||
# writing an untracked file into the worktree under test.
|
||||
rm "$config_home/hypr"
|
||||
mkdir "$config_home/hypr"
|
||||
cp "$repo_dir/config/dot/hypr/hyprlock.conf.template" \
|
||||
"$config_home/hypr/hyprlock.conf.template"
|
||||
HOME="$home" XDG_CONFIG_HOME="$config_home" "$theme_helper" dark >/dev/null
|
||||
fallback_lock="$(run_doctor --json)"
|
||||
check_status "$fallback_lock" desktop.hyprlock warning
|
||||
assert_schema_and_redaction "$fallback_lock"
|
||||
|
||||
rm "$config_home/hypr"
|
||||
rm -rf "$config_home/hypr"
|
||||
missing_lock="$(run_doctor --json)"
|
||||
check_status "$missing_lock" desktop.hyprlock error
|
||||
assert_schema_and_redaction "$missing_lock"
|
||||
|
||||
Reference in New Issue
Block a user