mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-21 09:36:51 +00:00
GODT-1474: Optimising live integration tests
- pkg/pmapi: Reduce max number of retries - test/features: tweak create mailbox scenarios. - test/context: change order of clean up steps - test/context: logger field - test/context: message preparation per username - test/context: check that eventID has changed after adding messages - test/features: make sure we wait 15sec before detecting import duplicates
This commit is contained in:
@ -14,8 +14,7 @@ Feature: IMAP IDLE with two users
|
||||
Scenario: IDLE statements are not leaked to other alias
|
||||
Given there is connected user "userMoreAddresses"
|
||||
And there is "userMoreAddresses" in "combined" address mode
|
||||
And there is "userMoreAddresses" with mailbox "Folders/mbox"
|
||||
And there are messages in mailbox "Folders/mbox" for "userMoreAddresses"
|
||||
And there are messages in mailbox "INBOX" for "userMoreAddresses"
|
||||
| from | to | subject |
|
||||
| john.doe@mail.com | [primary] | foo |
|
||||
| jane.doe@mail.com | [secondary] | bar |
|
||||
|
||||
@ -2,6 +2,8 @@ Feature: IMAP create mailbox
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
And there is IMAP client logged in as "user"
|
||||
And "user" does not have mailbox "Folders/mbox"
|
||||
And "user" does not have mailbox "Labels/mbox"
|
||||
|
||||
Scenario: Create folder
|
||||
When IMAP client creates mailbox "Folders/mbox"
|
||||
|
||||
@ -58,14 +58,21 @@ Feature: IMAP create messages
|
||||
|
||||
# Importing duplicate messages when messageID cannot be found in Sent already.
|
||||
#
|
||||
# Previously, we discarded messages for which sender matches account address to
|
||||
# Previously, we discarded messages for which sender matches account address to
|
||||
# avoid duplicates, but this led to discarding messages imported through mail client.
|
||||
#
|
||||
# NOTE: We need to introduce cooldown here in order to detect duplicates
|
||||
# properly. Once mail is imported to API the Sphinx indices for duplicate
|
||||
# detection are updated every 10s. Therefore it is good to leave at least 15
|
||||
# second gap after import in order to be able to correctly handle the case
|
||||
# when we try to detect duplicate imports
|
||||
Scenario: Imports a similar (duplicate) message to sent
|
||||
Given there are messages in mailbox "Sent" for "userMoreAddresses"
|
||||
| from | to | subject | body |
|
||||
| [primary] | chosen@one.com | Meet the Twins | Hello, Mr. Anderson |
|
||||
And wait for Sphinx to create duplication indices
|
||||
And there is IMAP client selected in "Sent"
|
||||
Then mailbox "Sent" for "userMoreAddresses" has 1 messages
|
||||
When IMAP client creates message "Meet the Twins" from address "primary" of "userMoreAddresses" to "chosen@one.com" with body "Hello, Mr. Anderson" in "Sent"
|
||||
Then IMAP response is "OK"
|
||||
Then IMAP response is "OK \[APPENDUID 4 2\] APPEND completed"
|
||||
And mailbox "Sent" for "userMoreAddresses" has 2 messages
|
||||
|
||||
@ -27,7 +27,7 @@ Feature: IMAP operations with Drafts
|
||||
Then IMAP response contains "Nope"
|
||||
When IMAP client sends command "UID FETCH 1 RFC822.SIZE"
|
||||
Then IMAP response is "OK"
|
||||
Then IMAP response contains "495"
|
||||
Then IMAP response contains "538"
|
||||
When IMAP client sends command "UID FETCH 1 BODYSTRUCTURE"
|
||||
Then IMAP response is "OK"
|
||||
Then IMAP response contains "4 14"
|
||||
@ -40,7 +40,7 @@ Feature: IMAP operations with Drafts
|
||||
Then IMAP response does not contain "Nope"
|
||||
When IMAP client sends command "UID FETCH 2 RFC822.SIZE"
|
||||
Then IMAP response is "OK"
|
||||
Then IMAP response contains "499"
|
||||
Then IMAP response contains "542"
|
||||
When IMAP client sends command "UID FETCH 2 BODYSTRUCTURE"
|
||||
Then IMAP response is "OK"
|
||||
Then IMAP response contains "8 14"
|
||||
|
||||
Reference in New Issue
Block a user