Mirrors vmic's tests/live_test.sh convention (colored PASS/FAIL/SKIP,
section headers, an EXIT trap that always cleans up, safety scoped to
test-prefixed names) but adapted for porthole: whole run sandboxed under
a temp PORTHOLE_STATE_DIR_OVERRIDE so it never touches the real
~/.config/porthole or ~/.local/state/porthole.
15 phases covering every mapping kind (-l/-r/-d) against the real
server, a real 2-hop -J ProxyJump (self-jump - only one server is
available), real auth success/failure classification (not just the
synthetic DNS-failure cases cargo test covers), open --all/--once,
close --force vs. graceful vs. idempotent, edit-while-running, the
remove --keep-running orphan path, a transfer export/import round trip
that actually reopens the imported profile, and a guarded wipe phase
that verifies kill_orphaned_supervisors for real.
wipe kills any __supervise process system-wide by design (not scoped to
the sandboxed state dir), so before running it the script scans the
real process table and skips the phase entirely if it finds a live
supervisor that isn't one of its own test profiles - a real tunnel
left open elsewhere is never killed as a side effect of running this
suite.
Verified the CLI-surface and error-path phases (no server needed)
directly against the built binary; phases requiring the real server
are left for a manual run, per the established pattern in this project
of live-server tests being run by hand rather than automated in CI.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>