GODT-1136 DB Cache header from builder and test

This commit is contained in:
Jakub
2021-04-13 07:49:13 +02:00
committed by James Houlahan
parent 454d248819
commit 8ab05a000c
21 changed files with 471 additions and 306 deletions

View File

@ -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)