3bb81b3a

By: Michael Lynch <git@mtlynch.io>

Simplify e2e fixtures to one per-test server fixture

The old fixtures.ts split server management across two layers: a
worker-scoped workerServer fixture holding a restart() closure with
mutable state (serverProcess, log buffers, a nextDatabaseID counter),
plus a hidden test-scoped resetServer auto-fixture that called
restart() before every test. Since every test triggered a full seed-DB
copy and server process restart anyway, the worker scope only reused a
port number and a temp directory, both trivially cheap to recreate.

Replace the two layers with a single test-scoped auto fixture that,
for each test, copies the seed database into a fresh temp directory,
starts a dedicated server process on its own free port, and tears both
down afterwards. Server startup logic now lives in a startServer()
helper that captures stdout/stderr and includes it in startup errors,
matching the old diagnostics.

Behavior is unchanged: same env vars (LITTLE_MOMENTS_E2E_DB,
LITTLE_MOMENTS_E2E_MEDIA_DIR), same binary and flags, same /about
health poll with 15s timeout, same SIGTERM-then-SIGKILL shutdown, and
the same number of DB copies and process spawns per run.

Also rename loginAsAdmin to logInAsAdmin for consistency with logInAs
and logInAsSubscriber.

Verified with nix build .#e2e-tests: 19 passed (5.8s).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Suite timing

Time to Start Worker time Duration Time to finish Idle
Config 1s 7s 7s 9s 1s
Eval 8s 1m48s 1m48s 1m56s 0s
Build 1m53s 9m04s 2m42s 4m35s 0s
Suite 1s 11m00s 4m33s 4m35s 2s

Timeline

0s20s40s1m1m20s1m40s2m2m20s2m40s3m3m20s3m40s4m4m20s