beads/internal/molecules
Xexr 376122ba46
fix: prevent test suite from leaking databases onto production Dolt server (#2089)
Set BEADS_TEST_MODE=1 unconditionally in all 9 TestMain functions that
interact with Dolt, before the test server nil check. Previously, test
mode was only set when the test Dolt server started successfully — if it
failed, tests silently connected to production on port 3307 and created
testdb_/beads_* databases that were never cleaned up.

Also:
- Fix doctorTestServerPort() fallback from 3307 (production) to 0
- Add dolt_purge_dropped_databases() to both cleanup functions
- Add isolated test Dolt server to integration test TestMain which had
  no server at all, causing bd init subprocess to hit production

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: beads/crew/lydia <steve.yegge@gmail.com>
2026-02-24 22:26:30 -08:00
..
molecules.go refactor: remove storage factory, memory backend, and provider abstraction (Phase 7) 2026-02-15 11:27:39 -08:00
molecules_test.go feat(testutil): branch-per-test isolation for dolt, tracker, molecules (L2) 2026-02-24 16:16:56 -08:00
testmain_test.go fix: prevent test suite from leaking databases onto production Dolt server (#2089) 2026-02-24 22:26:30 -08:00