chore: add standard test logger ignoring db canceled (#15556)

Refactors our use of `slogtest` to instantiate a "standard logger" across most of our tests.  This standard logger incorporates https://github.com/coder/slog/pull/217 to also ignore database query canceled errors by default, which are a source of low-severity flakes.

Any test that has set non-default `slogtest.Options` is left alone. In particular, `coderdtest` defaults to ignoring all errors. We might consider revisiting that decision now that we have better tools to target the really common flaky Error logs on shutdown.
This commit is contained in:
Spike Curtis
2024-11-18 14:09:22 +04:00
committed by GitHub
parent 4719d2406f
commit 5861e516b9
95 changed files with 443 additions and 501 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ replace github.com/pkg/sftp => github.com/mafredri/sftp v1.13.6-0.20231212144145
replace github.com/lib/pq => github.com/coder/pq v1.10.5-0.20240813183442-0c420cb5a048
require (
cdr.dev/slog v1.6.2-0.20240126064726-20367d4aede6
cdr.dev/slog v1.6.2-0.20241112041820-0ec81e6e67bb
cloud.google.com/go/compute/metadata v0.5.2
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
github.com/adrg/xdg v0.5.0