forked from Silverfish/proton-bridge
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:
@ -30,6 +30,7 @@ func IMAPActionsMailboxFeatureContext(s *godog.Suite) {
|
||||
s.Step(`^IMAP client lists mailboxes$`, imapClientListsMailboxes)
|
||||
s.Step(`^IMAP client selects "([^"]*)"$`, imapClientSelects)
|
||||
s.Step(`^IMAP client gets info of "([^"]*)"$`, imapClientGetsInfoOf)
|
||||
s.Step(`^IMAP client "([^"]*)" gets info of "([^"]*)"$`, imapClientNamedGetsInfoOf)
|
||||
s.Step(`^IMAP client gets status of "([^"]*)"$`, imapClientGetsStatusOf)
|
||||
}
|
||||
|
||||
@ -74,8 +75,12 @@ func imapClientSelects(mailboxName string) error {
|
||||
}
|
||||
|
||||
func imapClientGetsInfoOf(mailboxName string) error {
|
||||
res := ctx.GetIMAPClient("imap").GetMailboxInfo(mailboxName)
|
||||
ctx.SetIMAPLastResponse("imap", res)
|
||||
return imapClientNamedGetsInfoOf("imap", mailboxName)
|
||||
}
|
||||
|
||||
func imapClientNamedGetsInfoOf(clientName, mailboxName string) error {
|
||||
res := ctx.GetIMAPClient(clientName).GetMailboxInfo(mailboxName)
|
||||
ctx.SetIMAPLastResponse(clientName, res)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user