Commit 0a1d44c
committed
chore(ci): extract helpers from brev-e2e beforeAll and remove phantom version field
Refactor test/e2e/brev-e2e.test.ts for issue #1390:
- Extract named helpers from the ~350-line monolithic beforeAll:
cleanupLeftoverInstance(), createBrevInstance(), refreshAndWaitForSsh(),
bootstrapLaunchable(), pollForSandboxReady(), writeManualRegistry().
The beforeAll now reads as a high-level orchestration (~50 lines).
- Deduplicate brev create + error recovery: the deploy-cli and launchable
paths shared duplicated brev refresh + waitForSsh patterns, now
consolidated into refreshAndWaitForSsh().
- Remove phantom version: 1 from the manual registry write. The
SandboxRegistry interface in src/lib/registry.ts has no version field;
registerSandbox() doesn't write one either.
- bootstrapLaunchable() returns { remoteDir, needsOnboard } instead of
mutating module-level state as a hidden side-effect.
- instanceCreated is set at call sites in beforeAll, not hidden inside
createBrevInstance().
- Remove dead sleep() helper (defined but never called).
Pure refactoring — no behavior changes. // @ts-nocheck pragma preserved.
Note: PR #1791 (openshell-vm microVM) also touches this file — whoever
merges second will need a rebase.1 parent fcdfeed commit 0a1d44c
1 file changed
Lines changed: 346 additions & 312 deletions
0 commit comments