test: fix flaky tests.

This commit is contained in:
Romain Le Jeune
2023-05-22 11:16:56 +00:00
parent bb99695e68
commit 9c25f56fe6
57 changed files with 265 additions and 109 deletions

View File

@ -6,10 +6,12 @@ Feature: A user can authenticate an SMTP client
And the account "[user:user]" has additional address "[alias:alias]@[domain]"
And the account "[user:user2]" has additional disabled address "[alias:alias2]@[domain]"
And the account "[user:user3]" has additional address "[alias:alias3]@[domain]"
And bridge starts
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
And the user logs in with username "[user:user2]" and password "password2"
And the user logs in with username "[user:user3]" and password "password3"
Then it succeeds
Scenario: SMTP client can authenticate successfully
When user "[user:user]" connects SMTP client "1"

View File

@ -1,9 +1,11 @@
Feature: SMTP initiation
Background:
Given there exists an account with username "[user:user]" and password "password"
And bridge starts
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
When user "[user:user]" connects and authenticates SMTP client "1"
And user "[user:user]" connects and authenticates SMTP client "1"
Then it succeeds
Scenario: Send without first announcing FROM and TO
When SMTP client "1" sends DATA:

View File

@ -1,10 +1,12 @@
Feature: A user can connect an SMTP client to custom ports
Background:
Given there exists an account with username "[user:user]" and password "password"
And bridge starts
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
And the user changes the SMTP port to 1144
Then it succeeds
Scenario: Authenticates successfully on custom port
When the user changes the SMTP port to 1144
When user "[user:user]" connects SMTP client "1" on port 1144
Then SMTP client "1" can authenticate

View File

@ -1,12 +1,14 @@
Feature: SMTP with bcc
Background:
Given there exists an account with username "[user:user]" and password "password"
Given there exists an account with username "[user:to]" and password "password"
Given there exists an account with username "[user:bcc]" and password "password"
And bridge starts
And there exists an account with username "[user:to]" and password "password"
And there exists an account with username "[user:bcc]" and password "password"
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
And the user logs in with username "[user:bcc]" and password "password"
And user "[user:user]" connects and authenticates SMTP client "1"
Then it succeeds
Scenario: Send message to address in to and bcc
When SMTP client "1" sends the following message from "[user:user]@[domain]" to "[user:to]@[domain], [user:bcc]@[domain]":

View File

@ -2,10 +2,12 @@ Feature: SMTP sending embedded message
Background:
Given there exists an account with username "[user:user]" and password "password"
And there exists an account with username "[user:to]" and password "password"
And bridge starts
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
And the user logs in with username "[user:to]" and password "password"
And user "[user:user]" connects and authenticates SMTP client "1"
Then it succeeds
@long-black
Scenario: Send it

View File

@ -2,9 +2,11 @@ Feature: SMTP wrong messages
Background:
Given there exists an account with username "[user:user]" and password "password"
And there exists an account with username "[user:to]" and password "password"
And bridge starts
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
And user "[user:user]" connects and authenticates SMTP client "1"
Then it succeeds
Scenario: Message with attachment and wrong boundaries
When SMTP client "1" sends the following message from "[user:user]@[domain]" to "[user:to]@[domain]":

View File

@ -2,9 +2,11 @@ Feature: SMTP sending of plain messages
Background:
Given there exists an account with username "[user:user]" and password "password"
And there exists an account with username "[user:to]" and password "password"
And bridge starts
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
And user "[user:user]" connects and authenticates SMTP client "1"
Then it succeeds
Scenario: HTML message to external account
When SMTP client "1" sends the following message from "[user:user]@[domain]" to "pm.bridge.qa@gmail.com":

View File

@ -2,9 +2,11 @@ Feature: SMTP sending of plain messages
Background:
Given there exists an account with username "[user:user]" and password "password"
And there exists an account with username "[user:to]" and password "password"
And bridge starts
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
And user "[user:user]" connects and authenticates SMTP client "1"
Then it succeeds
Scenario: HTML message with attachment to internal account
When SMTP client "1" sends the following message from "[user:user]@[domain]" to "[user:to]@[domain]":

View File

@ -2,9 +2,11 @@ Feature: SMTP messages containing inlines
Background:
Given there exists an account with username "[user:user]" and password "password"
And there exists an account with username "[user:to]" and password "password"
And bridge starts
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
And user "[user:user]" connects and authenticates SMTP client "1"
Then it succeeds
Scenario: A message with inline attachment to internal account
When SMTP client "1" sends the following message from "[user:user]@[domain]" to "[user:to]@[domain]":

View File

@ -2,9 +2,11 @@ Feature: SMTP sending with mixed case address
Background:
Given there exists an account with username "[user:user]" and password "password"
And there exists an account with username "[user:to]" and password "password"
And bridge starts
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
And user "[user:user]" connects and authenticates SMTP client "1"
Then it succeeds
Scenario: Mixed sender case in sender address
When SMTP client "1" sends the following message from "[user:user]@[domain]" to "[user:to]@[domain]":

View File

@ -2,9 +2,11 @@ Feature: SMTP sending two messages
Background:
Given there exists an account with username "[user:user]" and password "password"
And there exists an account with username "[user:recp]" and password "password"
And bridge starts
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
And the user logs in with username "[user:recp]" and password "password"
Then it succeeds
@long-black

View File

@ -3,9 +3,11 @@ Feature: SMTP sending of plain messages
Given there exists an account with username "[user:user]" and password "password"
And there exists an account with username "[user:to]" and password "password"
And there exists an account with username "[user:cc]" and password "password"
And bridge starts
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
And user "[user:user]" connects and authenticates SMTP client "1"
Then it succeeds
Scenario: Only from and to headers to internal account
When SMTP client "1" sends the following message from "[user:user]@[domain]" to "[user:to]@[domain]":

View File

@ -2,9 +2,11 @@ Feature: SMTP sending of plain messages
Background:
Given there exists an account with username "[user:user]" and password "password"
And there exists an account with username "[user:to]" and password "password"
And bridge starts
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
And user "[user:user]" connects and authenticates SMTP client "1"
Then it succeeds
Scenario: Basic message with attachment to internal account
When SMTP client "1" sends the following message from "[user:user]@[domain]" to "[user:to]@[domain]":

View File

@ -2,7 +2,8 @@ Feature: SMTP sending the same message twice
Background:
Given there exists an account with username "[user:user]" and password "password"
And there exists an account with username "[user:to]" and password "password"
And bridge starts
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
And the user logs in with username "[user:to]" and password "password"
And user "[user:user]" connects and authenticates SMTP client "1"

View File

@ -2,10 +2,12 @@ Feature: SMTP sending with APPENDing to Sent
Background:
Given there exists an account with username "[user:user]" and password "password"
And there exists an account with username "[user:to]" and password "password"
And bridge starts
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
And user "[user:user]" connects and authenticates SMTP client "1"
And user "[user:user]" connects and authenticates IMAP client "1"
Then it succeeds
Scenario: Send message and append to Sent
# First do sending.

View File

@ -3,11 +3,13 @@ Feature: SMTP send reply
Background:
Given there exists an account with username "[user:user1]" and password "password"
And there exists an account with username "[user:user2]" and password "password"
And bridge starts
Then it succeeds
When bridge starts
And the user logs in with username "[user:user1]" and password "password"
And user "[user:user1]" finishes syncing
And user "[user:user1]" connects and authenticates SMTP client "1"
And user "[user:user1]" connects and authenticates IMAP client "1"
Then it succeeds
@long-black
Scenario: Reply with In-Reply-To but no References

View File

@ -4,10 +4,12 @@ Feature: SMTP sending two messages
And there exists an account with username "[user:multi]" and password "password"
And the account "[user:multi]" has additional address "[user:multi-alias]@[domain]"
And there exists an account with username "[user:to]" and password "password"
And bridge starts
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
And the user logs in with username "[user:multi]" and password "password"
And the user sets the address mode of user "[user:multi]" to "split"
Then it succeeds
Scenario: Send two messages in one connection
When user "[user:user]" connects and authenticates SMTP client "1"