mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-19 16:46:55 +00:00
Import encrypted messages as is
This commit is contained in:
@ -41,6 +41,7 @@ func TransferSetupFeatureContext(s *godog.Suite) {
|
||||
s.Step(`^there are IMAP mailboxes$`, thereAreIMAPMailboxes)
|
||||
s.Step(`^there are IMAP messages$`, thereAreIMAPMessages)
|
||||
s.Step(`^there is IMAP message in mailbox "([^"]*)" with seq (\d+), uid (\d+), time "([^"]*)" and subject "([^"]*)"$`, thereIsIMAPMessage)
|
||||
s.Step(`^there is skip encrypted messages set to "([^"]*)"$`, thereIsSkipEncryptedMessagesSetTo)
|
||||
}
|
||||
|
||||
func thereAreEMLFiles(messages *gherkin.DataTable) error {
|
||||
@ -259,3 +260,15 @@ func createFile(fileName, body string) error {
|
||||
_, err = f.WriteString(body)
|
||||
return internalError(err, "failed to write to file")
|
||||
}
|
||||
|
||||
func thereIsSkipEncryptedMessagesSetTo(value string) error {
|
||||
switch value {
|
||||
case "true":
|
||||
ctx.SetTransferSkipEncryptedMessages(true)
|
||||
case "false":
|
||||
ctx.SetTransferSkipEncryptedMessages(false)
|
||||
default:
|
||||
return fmt.Errorf("expected either true or false, was %v", value)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user