1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00

smtp: Break up handler tests (#290)

* Do drain logging from main to reduce test output
* Break up some of the larger handler test funcs
* Introduce sub-tests
This commit is contained in:
James Hillyerd
2022-08-25 14:19:57 -07:00
committed by GitHub
parent 9dbffa88de
commit c8d22ac802
3 changed files with 112 additions and 86 deletions

View File

@@ -145,9 +145,13 @@ signalLoop:
// Wait for active connections to finish.
go timedExit(*pidfile)
log.Debug().Str("phase", "shutdown").Msg("Draining SMTP connections")
services.SMTPServer.Drain()
log.Debug().Str("phase", "shutdown").Msg("Draining POP3 connections")
services.POP3Server.Drain()
log.Debug().Str("phase", "shutdown").Msg("Checking retention scanner is stopped")
services.RetentionScanner.Join()
removePIDFile(*pidfile)
closeLog()
}