1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00

smtpsrv: Make tests log maillog to stdout

This commit is contained in:
Alberto Bertogli
2019-12-01 18:21:13 +00:00
parent a6a964ac3e
commit e8a6bf6188

View File

@@ -18,6 +18,7 @@ import (
"time"
"blitiri.com.ar/go/chasquid/internal/aliases"
"blitiri.com.ar/go/chasquid/internal/maillog"
"blitiri.com.ar/go/chasquid/internal/testlib"
"blitiri.com.ar/go/chasquid/internal/userdb"
)
@@ -532,6 +533,10 @@ func realMain(m *testing.M) int {
}
str1MiB = string(buf)
// Set up the mail log to stdout, which is captured by the test runner,
// so we have better debugging information on failures.
maillog.Default = maillog.New(os.Stdout)
if *externalSMTPAddr != "" {
smtpAddr = *externalSMTPAddr
submissionAddr = *externalSubmissionAddr