mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-07-25 06:21:10 +00:00
Add automated coverage floor validation: - scripts/check_coverage.go: parses coverage.out, compares to per-package thresholds, supports --update to lock current floors - scripts/coverage_thresholds.json: 61 packages, initial floors from Phase 1 - .github/workflows/ci.yaml: new 'Coverage ratchet gate' step in CI - internal/testutil/: test utilities (context builders, TestDB, doc.go)
14 lines
736 B
Go
14 lines
736 B
Go
package testutil
|
|
|
|
// gomock-based store mocks generation hooks.
|
|
//
|
|
// Setup: go install go.uber.org/mock/mockgen@latest
|
|
// Run: go generate ./internal/testutil/...
|
|
//
|
|
// Generated files are checked into the repo so tests work without extra setup.
|
|
// Add new interfaces below when a new package needs a mock for unit tests.
|
|
|
|
//go:generate mockgen -destination=mock_session_store.go -package=testutil github.com/nextlevelbuilder/goclaw/internal/store SessionStore
|
|
//go:generate mockgen -destination=mock_agent_store.go -package=testutil github.com/nextlevelbuilder/goclaw/internal/store AgentStore
|
|
//go:generate mockgen -destination=mock_contact_store.go -package=testutil github.com/nextlevelbuilder/goclaw/internal/store ContactStore
|