feat: move MockLogger into a logtest sub-package
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>
This commit is contained in:
@@ -23,11 +23,3 @@ func TestContextLogger(t *testing.T) {
|
||||
ctx := ContextWithLogger(context.Background(), custom)
|
||||
assert.Same(t, custom, LoggerFromContext(ctx))
|
||||
}
|
||||
|
||||
func TestMockLogger(t *testing.T) {
|
||||
m := NewMockLogger()
|
||||
m.Logger().Info("hello", "k", "v")
|
||||
m.Check(t, []string{`level=INFO msg=hello k=v`})
|
||||
empty := NewMockLogger()
|
||||
empty.Check(t, nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user