Refactored 3 smaller test files for test suite optimization: FILES ANALYZED: - validate_test.go (9 tests): NO DB needed - pure validation logic - epic_test.go (3 tests): 2 DB setups → 1 shared pattern - duplicates_test.go (5 tests): 1 old setupTestDB → newTestStore CHANGES: epic_test.go: - Replaced 2× manual sqlite.New() with newTestStore() - Removed duplicate SetConfig calls - Removed manual Close/defer (handled by helper) - -40 lines, +6 lines = net -34 lines duplicates_test.go: - Replaced old setupTestDB pattern with newTestStore - Updated test data: bd-1/2/3 → test-1/2/3 (matches prefix) - Added filepath import - Removed cleanup() function pattern - Net changes: proper shared pattern adoption METRICS: - Total files changed: 2/3 (validate_test.go needs no DB!) - DB setups eliminated: 3 → 1 (epic: 2→1, duplicates: 1→0+shared) - Lines saved: 30 net reduction - Tests passing: 13/13 ✓ validate_test.go required NO changes - all tests are pure functions with in-memory data. Even git conflict tests use temp files, not DB. Part of Phase 2/3 test suite optimization. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
6.6 KiB
6.6 KiB