Merge pull request #766 from johnweldon/jw4/fix-logger-errors

framework/log: Fix Logger usages in tests
This commit is contained in:
Max Mazurov 2025-02-23 00:04:58 +03:00 committed by GitHub
commit 9cf2adb5b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 4 deletions

View file

@ -39,10 +39,11 @@ func TestStore(t *testing.T, newStore func() module.BlobStore, cleanStore func(m
prng := rand.New(randSrc) prng := rand.New(randSrc)
store := newStore() store := newStore()
l := testutils.Logger(t, "imapsql")
b, err := imapsql.New("sqlite3", ":memory:", b, err := imapsql.New("sqlite3", ":memory:",
imapsql2.ExtBlobStore{Base: store}, imapsql.Opts{ imapsql2.ExtBlobStore{Base: store}, imapsql.Opts{
PRNG: prng, PRNG: prng,
Log: testutils.Logger(t, "imapsql"), Log: &l,
}, },
) )
if err != nil { if err != nil {

View file

@ -32,7 +32,8 @@ import (
) )
func targetWithExtResolver(t *testing.T, zones map[string]mockdns.Zone) (*mockdns.Server, *Target) { func targetWithExtResolver(t *testing.T, zones map[string]mockdns.Zone) (*mockdns.Server, *Target) {
dnsSrv, err := mockdns.NewServerWithLogger(zones, testutils.Logger(t, "mockdns"), false) l := testutils.Logger(t, "mockdns")
dnsSrv, err := mockdns.NewServerWithLogger(zones, &l, false)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }

View file

@ -303,7 +303,8 @@ func TestRemoteDelivery_AuthMX_DNSSEC(t *testing.T) {
}, },
} }
dnsSrv, err := mockdns.NewServerWithLogger(zones, testutils.Logger(t, "mockdns"), false) l := testutils.Logger(t, "mockdns")
dnsSrv, err := mockdns.NewServerWithLogger(zones, &l, false)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
@ -342,7 +343,8 @@ func TestRemoteDelivery_AuthMX_DNSSEC_Fail(t *testing.T) {
}, },
} }
dnsSrv, err := mockdns.NewServerWithLogger(zones, testutils.Logger(t, "mockdns"), false) l := testutils.Logger(t, "mockdns")
dnsSrv, err := mockdns.NewServerWithLogger(zones, &l, false)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }