Commit Graph

2 Commits

Author SHA1 Message Date
Peter Chanthamynavong
520518c68b refactor(test): replace testify with stdlib in daemon tests (#936)
The daemon socket tests relied on an external assertion library, which
increased the module's dependency footprint and deviated from Go's
idiomatic testing patterns.

This commit introduces a leaner testing approach using the standard
library:
- Replace testify/assert calls with standard if checks and t.Errorf
- Remove testify and associated indirects from go.mod

These changes preserve existing test behavior while simplifying the
build process and reducing external maintenance overhead.
2026-01-06 19:29:57 -08:00
Peter Chanthamynavong
e9e0d7f1e5 feat(daemon): add BD_SOCKET env var for test isolation (#914)
Add BD_SOCKET environment variable support to override daemon socket path,
enabling parallel test isolation via t.TempDir() + t.Setenv().

Changes:
- getSocketPath() checks BD_SOCKET first, falls back to dbPath-derived path
- getSocketPathForPID() checks BD_SOCKET first (for consistency)
- Add daemon_socket_test.go with isolation pattern examples

This is a minimal tracer bullet to validate the approach before
expanding to full test isolation infrastructure.

Backward compatible: default behavior unchanged without env var set.
2026-01-06 19:13:49 -08:00