mirror of
https://github.com/foxcpp/maddy.git
synced 2025-04-04 21:47:40 +03:00
Merge pull request #766 from johnweldon/jw4/fix-logger-errors
framework/log: Fix Logger usages in tests
This commit is contained in:
commit
9cf2adb5b1
3 changed files with 8 additions and 4 deletions
|
@ -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 {
|
||||||
|
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue