GODT-1159 SMTP server not restarting after restored internet

- [x] write tests to check that IMAP and SMTP servers are closed when there
  is no internet
- [x] always create new go-smtp instance during listenAndServe(int)
This commit is contained in:
Jakub
2021-05-04 13:50:26 +02:00
committed by James Houlahan
parent 0b95ed4dea
commit dd66b7f8d0
19 changed files with 519 additions and 227 deletions

View File

@ -34,7 +34,7 @@ func (sr *SMTPResponse) AssertOK() *SMTPResponse {
func (sr *SMTPResponse) AssertError(wantErrMsg string) *SMTPResponse {
if sr.err == nil {
a.Fail(sr.t, "Expected error %s", wantErrMsg)
a.Fail(sr.t, "Error is nil", "Expected to have %q", wantErrMsg)
} else {
a.Regexp(sr.t, wantErrMsg, sr.err.Error(), "Expected error %s but got %s", wantErrMsg, sr.err)
}