mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-18 08:06:59 +00:00
GODT-1136 DB Cache header from builder and test
This commit is contained in:
@ -30,6 +30,8 @@ import (
|
||||
func IMAPActionsMessagesFeatureContext(s *godog.Suite) {
|
||||
s.Step(`^IMAP client sends command "([^"]*)"$`, imapClientSendsCommand)
|
||||
s.Step(`^IMAP client fetches "([^"]*)"$`, imapClientFetches)
|
||||
s.Step(`^IMAP client fetches header(?:s)? of "([^"]*)"$`, imapClientFetchesHeader)
|
||||
s.Step(`^IMAP client fetches body "([^"]*)"$`, imapClientFetchesBody)
|
||||
s.Step(`^IMAP client fetches by UID "([^"]*)"$`, imapClientFetchesByUID)
|
||||
s.Step(`^IMAP client searches for "([^"]*)"$`, imapClientSearchesFor)
|
||||
s.Step(`^IMAP client copies message seq "([^"]*)" to "([^"]*)"$`, imapClientCopiesMessagesTo)
|
||||
@ -76,6 +78,18 @@ func imapClientFetches(fetchRange string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func imapClientFetchesHeader(fetchRange string) error {
|
||||
res := ctx.GetIMAPClient("imap").Fetch(fetchRange, "BODY.PEEK[HEADER]")
|
||||
ctx.SetIMAPLastResponse("imap", res)
|
||||
return nil
|
||||
}
|
||||
|
||||
func imapClientFetchesBody(fetchRange string) error {
|
||||
res := ctx.GetIMAPClient("imap").Fetch(fetchRange, "BODY.PEEK[]")
|
||||
ctx.SetIMAPLastResponse("imap", res)
|
||||
return nil
|
||||
}
|
||||
|
||||
func imapClientFetchesByUID(fetchRange string) error {
|
||||
res := ctx.GetIMAPClient("imap").FetchUID(fetchRange, "UID")
|
||||
ctx.SetIMAPLastResponse("imap", res)
|
||||
|
||||
Reference in New Issue
Block a user