refactor: extract shared test utilities into internal/testutil (#531)#539
refactor: extract shared test utilities into internal/testutil (#531)#539nextlevelshit merged 2 commits intomainfrom
Conversation
Create internal/testutil package with reusable test infrastructure: - EventCollector: thread-safe event.EventEmitter for test assertions - MockStateStore: configurable state.StateStore with functional options - CreateTestManifest: standard test manifest with navigator/craftsman Migrate 10 test files in internal/pipeline/ to use shared utilities, eliminating ~200 lines of duplicated mock implementations.
Code Review (Wave Pipeline)Verdict: APPROVE ✅ This PR cleanly extracts duplicated test infrastructure ( SecurityNo issues found. This is test-only code with no impact on security posture — no SQL, no HTTP handlers, no secrets, no deserialization of untrusted input. Suggested ImprovementsThese are not blocking but would strengthen the PR: 1. Remove dead field
|
Summary
Extracts reusable test infrastructure into a dedicated internal/testutil package.
Changes
Benefits
Test Coverage
All tests passing with race detector:
Tests for all 32+ packages pass successfully.