Refresh shell test fixtures

This commit is contained in:
David Heinemeier Hansson
2026-07-22 17:31:14 -07:00
parent 43e95217f2
commit 7361b48461
3 changed files with 29 additions and 7 deletions
+14 -3
View File
@@ -60,11 +60,22 @@ exit 0
SH
chmod +x "$stub_bin/omarchy-update-available"
cat >"$test_root/shell/plugins/panels/weather/status.sh" <<'SH'
cat >"$stub_bin/curl" <<'SH'
#!/bin/bash
printf '{"text":"72F","class":"sunny"}\n'
case "${*: -1}" in
*'?format=j1')
printf '{"current_condition":[{"weatherCode":"113","temp_F":"72"}]}\n'
;;
*'?format=%l')
printf 'Test City, Test Region\n'
;;
*)
exit 1
;;
esac
SH
chmod +x "$test_root/shell/plugins/panels/weather/status.sh"
chmod +x "$stub_bin/curl"
OMARCHY_PATH="$test_root" \
HOME="$test_home" \
+14 -3
View File
@@ -70,11 +70,22 @@ exit 0
SH
chmod +x "$stub_bin/omarchy-update-available"
cat >"$test_root/shell/plugins/panels/weather/status.sh" <<'SH'
cat >"$stub_bin/curl" <<'SH'
#!/bin/bash
printf '{"text":"72F","class":"sunny"}\n'
case "${*: -1}" in
*'?format=j1')
printf '{"current_condition":[{"weatherCode":"113","temp_F":"72"}]}\n'
;;
*'?format=%l')
printf 'Test City, Test Region\n'
;;
*)
exit 1
;;
esac
SH
chmod +x "$test_root/shell/plugins/panels/weather/status.sh"
chmod +x "$stub_bin/curl"
OMARCHY_PATH="$test_root" \
HOME="$test_home" \
+1 -1
View File
@@ -39,7 +39,7 @@ assert_power_calls() {
local expected_log="$test_tmp/$action-expected.log"
cat >"$expected_log" <<EOF
systemd-run --user --collect --quiet --on-active=2s systemctl $systemctl_action --no-wall
systemd-run --user --collect --quiet --on-active=2s --timer-property=AccuracySec=100ms systemctl $systemctl_action --no-wall
omarchy-state clear re*-required
omarchy-hyprland-window-close-all
sleep 1