GODT-1143 Turn off SMTP server while no connection

This commit is contained in:
Michal Horejsek
2021-04-14 13:09:28 +02:00
parent fed031ebaa
commit 22bf8f62ce
5 changed files with 168 additions and 14 deletions

View File

@ -60,7 +60,7 @@ func (ctx *TestContext) withSMTPServer() {
useSSL := ctx.settings.GetBool(settings.SMTPSSLKey)
backend := smtp.NewSMTPBackend(ph, ctx.listener, ctx.settings, ctx.bridge)
server := smtp.NewSMTPServer(true, port, useSSL, tls, backend, ctx.listener)
server := smtp.NewSMTPServer(ph, true, port, useSSL, tls, backend, ctx.listener)
go server.ListenAndServe()
require.NoError(ctx.t, waitForPort(port, 5*time.Second))