Found in review of #66: the TestLive* tests run against the user's live Rex server whenever rex is on PATH #69
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Due date
No due date set.
Dependencies
No dependencies set
Reference
mikluko/rexcity!69
Loading…
Reference in a new issue
No description provided.
Delete branch "worker/rexcity-nxb62"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The TestLive* tests in internal/rex now run only when REXCITY_LIVE_TESTS is set, whatever rex is on PATH. Before, any rex that answered
rex --autostart=false whoamimade them run against the user's own Rex server and create and kill rexcity-test-* sessions there.Changes:
REXCITY_LIVE_TESTS=1 go test ./internal/rex.Verified without reaching the real Rex server, using stub
rexbinaries first on PATH:Bead: rexcity-nxb62
Reviewed
96179femerged into main5faf322: TestLive* gated on REXCITY_LIVE_TESTS; vet, test and changelog check pass with a stub rex.Reviewed
96179fe, merged into main at5faf322(after #76 and #77). The merge was clean.What I checked:
internal/rex/rex_test.goandREADME.md.liveClientnow skips unlessREXCITY_LIVE_TESTSis set, before it runsrex. The fourTestLive*tests (SessionLifecycle, Windows, Panes, Clients) all go through it.internal/rppuses the in-memoryfakeRex. The otherrextests ininternal/rexuse a script in a temp dir.TestFaultnever runs the binary. Nothing else runsrex, dials its socket or readsREX_SERVER.REXCITY_LIVE_TESTS. CI's ubuntu runner has norex, so these tests always skipped in CI. CI loses no coverage.rexstub that exits non-zero first on PATH:go vet ./...passed for the host, darwin/arm64 and linux/amd64,go test ./...passed, and the changelog check (mikluko/changelog v1.6.0, built from the tag) passed.rexfirst on PATH that records its calls and exits 0.go test ./...on the merge result passed and the stub recorded 0 calls. The same stub on the base, main, recorded 8 calls (whoami,session new rexcity-test-...), so the gate works.REXCITY_LIVE_TESTS=1 go test ./internal/rex. The test file says it too.Minor, no change needed now: any non-empty value turns the live tests on, so
REXCITY_LIVE_TESTS=0turns them on too.Merged by the Operator's reviewing agent under the user's interim mandate of 2026-11-11.