Route the delivery tests' gorm.Open through gormlog (closes #462)
check / check (push) Successful in 3m24s

The six gorm.Open calls in the internal/delivery tests passed a bare
gorm.Config, which installs GORM's default logger; they now pass
gormlog.New over a logger that discards, as every production call does,
so the unfiltered form is no longer in the tree to be copied.

The README and the ParamsFilter comment said (*gorm.DB).Scan had one
test-only caller; there are more. Both now say only tests call it, with
fixture data.

Model: opus-5-5
This commit is contained in:
2026-10-02 17:46:44 +00:00
committed by sneak
parent f82b730c31
commit 1711a53221
6 changed files with 23 additions and 14 deletions
+4 -5
View File
@@ -2609,11 +2609,10 @@ on all three arms of `Trace`, including the routine one an operator
reaches at `DEBUG`, which is the only level at which a successful
`INSERT` is written at all. One GORM path does not consult the filter —
`(*gorm.DB).Scan`, which records the statement through GORM's own trace
recorder. No production code path calls it; its one caller is
`internal/database/database_test.go:91`, whose `SELECT 1` binds
nothing, and `internal/gormlog/scan_guard_test.go` fails if a non-test
file calls it. `Pluck`, `Row` and `Raw` all run through the normal
callback processor and are filtered.
recorder. No production code path calls it; only tests do, and what a
test binds is fixture data. `internal/gormlog/scan_guard_test.go` fails
if a non-test file calls it. `Pluck`, `Row` and `Raw` all run through
the normal callback processor and are filtered.
See `#### What DEBUG=true exposes` under Configuration.
What that ceiling does **not** cover, stated here so the figure is not