✅ test(pacman): sandbox the region for every boundary test

- ✅ The channel and update boundary tests copied the real render and dev-region guard, so on a China install they read the host's `/etc/omarchy/region` and failed before reaching their checks
- ♻️ The shared fixture now points both lookups at a sandbox target that starts global, and the regional test only writes `cn` there

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdXqTwm63rRMwotZ1xqLC8
This commit is contained in:
Kros DaiandClaude Opus 5.5 committed 2026-10-06 22:14:56 -04:00
1 parent a1bdc46119
commit 3e00a48c00
2 files changed
+9 -10

No files matched your search

@@ -13,17 +13,8 @@ done
# A sandboxed China machine: the render reads this region marker, never the
# host's /etc/omarchy/region.
export SUDO_TEST_TARGET="$boundary_tmp/target"
mkdir -p "$SUDO_TEST_TARGET/etc/omarchy"
printf 'cn\n' >"$SUDO_TEST_TARGET/etc/omarchy/region"
python3 - "$SUDO_TEST_ROOT/bin/omarchy-apply-pacman" <<'PY'
import sys
path = sys.argv[1]
source = open(path).read()
render_etc = 'etc="${4:-/}/etc"'
assert source.count(render_etc) == 1, "render target lookup moved"
open(path, 'w').write(source.replace(render_etc, 'etc="${4:-$SUDO_TEST_TARGET}/etc"'))
PY
# cp still logs its step, but now really copies, so the rendered files exist.
# Root's copies into /etc land in a capture directory instead of the host.