feat: move MockLogger into a logtest sub-package #5

Merged
argoyle merged 1 commits from move-mocklogger-to-logtest into main 2026-06-19 16:43:28 +00:00
Owner

019ecc67 — logtest sub-package

NewMockLogger/MockLogger move from the main logging package to a new same-module logging/logtest sub-package (mirroring the existing middleware/ convention), so the production logging package's import graph is testify-free (go list -deps . → 0). testify stays in the module's go.mod because logtest and the library's own _test.go files use it — consumers only compile it if they import logtest.

Breaking import change

logging.NewMockLoggerlogtest.NewMockLogger. All call sites in the ~12 backend services are in _test.go files; they'll be swept (import swap + go.mod bump to this release) in follow-up PRs. feat: (no !) so the shared Release.yml cuts a minor v0.2.0 (v0.x breaking → minor), not v1.0.0.

Review

Go Backend Expert: clean, no Critical/High/Medium. Verified verbatim move, all packages test green under -race, root production graph testify-free, gofumpt/vet clean, go.mod unchanged (testify retained as a test dep). Same-module sub-package confirmed correct over a nested module.

🤖 Generated with Claude Code

## 019ecc67 — logtest sub-package `NewMockLogger`/`MockLogger` move from the main `logging` package to a new same-module `logging/logtest` sub-package (mirroring the existing `middleware/` convention), so the **production `logging` package's import graph is testify-free** (`go list -deps .` → 0). `testify` stays in the module's `go.mod` because `logtest` and the library's own `_test.go` files use it — consumers only compile it if they import `logtest`. ### Breaking import change `logging.NewMockLogger` → `logtest.NewMockLogger`. All call sites in the ~12 backend services are in `_test.go` files; they'll be swept (import swap + go.mod bump to this release) in follow-up PRs. `feat:` (no `!`) so the shared Release.yml cuts a minor **v0.2.0** (v0.x breaking → minor), not v1.0.0. ### Review Go Backend Expert: clean, no Critical/High/Medium. Verified verbatim move, all packages test green under -race, root production graph testify-free, gofumpt/vet clean, go.mod unchanged (testify retained as a test dep). Same-module sub-package confirmed correct over a nested module. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
argoyle added 1 commit 2026-06-19 16:37:24 +00:00
feat: move MockLogger into a logtest sub-package
logging / coverage-baseline (pull_request) Has been skipped
logging / vulnerabilities (pull_request) Successful in 1m32s
logging / test (pull_request) Successful in 2m48s
pre-commit / pre-commit (pull_request) Successful in 5m27s
a45c50ab7b
NewMockLogger/MockLogger move from the main `logging` package to a new
`logging/logtest` sub-package, so the production `logging` package's import
graph no longer pulls in testify — only consumers that import logtest do.
testify stays in the module's go.mod (used by logtest and the library's own
tests).

Breaking import change for consumers: `logging.NewMockLogger` becomes
`logtest.NewMockLogger`. The backend services that reference it are updated to
the logtest import alongside their go.mod bump to this release.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
argoyle scheduled this pull request to auto merge when all checks succeed 2026-06-19 16:37:26 +00:00

Coverage Report

Total coverage: 93%

## Coverage Report Total coverage: **93%**
argoyle merged commit a705fc33c4 into main 2026-06-19 16:43:28 +00:00
argoyle deleted branch move-mocklogger-to-logtest 2026-06-19 16:43:29 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shiny/logging#5