use debug logging in tests

by setting the loglevel to debug in package mlog.
we restore the "info" logging in main.
except for "mox localserve", which still sets debug by default.
This commit is contained in:
Mechiel Lukkien
2024-05-10 15:15:56 +02:00
parent bf8cfd9724
commit 9152384fd3
9 changed files with 44 additions and 20 deletions

View File

@ -1119,6 +1119,7 @@ func TestRatelimitConnectionrate(t *testing.T) {
// We'll be creating 300 connections, no TLS and reduce noise.
ts.tlsmode = smtpclient.TLSSkip
mlog.SetConfig(map[string]slog.Level{"": mlog.LevelInfo})
defer mlog.SetConfig(map[string]slog.Level{"": mlog.LevelDebug})
// We may be passing a window boundary during this tests. The limit is 300/minute.
// So make twice that many connections and hope the tests don't take too long.