feat(GODT-3185): report cases which leads to wrong address key used

This commit is contained in:
Jakub Cuth
2024-03-13 07:49:25 +00:00
parent d2fbbc3e25
commit 6fadbde4a6
18 changed files with 358 additions and 23 deletions

View File

@ -0,0 +1,45 @@
Feature: SMTP client authentication with address modes
Background:
Given there exists an account with username "[user:user]" and password "password"
And the account "[user:user]" has additional address "[alias:alias]@[domain]"
And it succeeds
Scenario: SMTP client can authenticate successfully with secondary address in combine mode
Given bridge starts
And the user logs in with username "[user:user]" and password "password"
And user "[user:user]" finishes syncing
When user "[user:user]" connects and authenticates SMTP client "1" with address "[alias:alias]@[domain]"
Then it succeeds
Scenario: SMTP client can authenticate successfully with secondary address in split mode
Given bridge starts
And the user logs in with username "[user:user]" and password "password"
And the user sets the address mode of user "[user:user]" to "split"
And user "[user:user]" finishes syncing
When user "[user:user]" connects and authenticates SMTP client "1" with address "[alias:alias]@[domain]"
Then it succeeds
# Need to find way to setup disabled address on black
@skip-black
Scenario: SMTP client can authenticate successfully with disabled alias in combine mode
Given the account "[user:user]" has additional disabled address "[alias:disabled]@[domain]"
And it succeeds
Given bridge starts
And the user logs in with username "[user:user]" and password "password"
And user "[user:user]" finishes syncing
When user "[user:user]" connects and authenticates SMTP client "1" with address "[alias:disabled]@[domain]"
Then it fails
# Need to find way to setup disabled address on black
@skip-black
Scenario: SMTP client can authenticate successfully with disabled alias in split mode
Given the account "[user:user]" has additional disabled address "[alias:disabled]@[domain]"
And it succeeds
Given bridge starts
And the user logs in with username "[user:user]" and password "password"
And the user sets the address mode of user "[user:user]" to "split"
And user "[user:user]" finishes syncing
When user "[user:user]" connects and authenticates SMTP client "1" with address "[alias:disabled]@[domain]"
Then it fails

View File

@ -20,5 +20,5 @@ Feature: SMTP wrong messages
Hello
"""
And it fails with error "Error: can't send on address: [user:disabled]@[domain]"
And it fails with error "Error: cannot send from address: [user:disabled]@[domain]"

View File

@ -331,4 +331,4 @@ Feature: SMTP sending of plain messages
}
]
}
"""
"""

View File

@ -0,0 +1,79 @@
Feature: Address key usage during SMTP send
Background:
Given there exists an account with username "[user:user]" and password "password"
And the account "[user:user]" has additional address "[alias:alias]@[domain]"
And it succeeds
Scenario: Non-active sender in combined mode using non-active key
Given bridge starts
And the user logs in with username "[user:user]" and password "password"
And it succeeds
When user "[user:user]" connects and authenticates SMTP client "1" with address "[user:user]@[domain]"
And SMTP client "1" sends the following message from "[alias:alias]@[domain]" to "pm.bridge.qa@gmail.com":
"""
From: Bridge Test <[alias:alias]@[domain]>
To: External Bridge <pm.bridge.qa@gmail.com>
hello
"""
Then it succeeds
And the message used "[alias:alias]@[domain]" key for sending
Scenario: Non-active sender in split mode using non-active key
Given bridge starts
And the user logs in with username "[user:user]" and password "password"
And the user sets the address mode of user "[user:user]" to "split"
And user "[user:user]" finishes syncing
And it succeeds
When user "[user:user]" connects and authenticates SMTP client "1" with address "[user:user]@[domain]"
And SMTP client "1" sends the following message from "[alias:alias]@[domain]" to "pm.bridge.qa@gmail.com":
"""
From: Bridge Test <[alias:alias]@[domain]>
To: External Bridge <pm.bridge.qa@gmail.com>
hello
"""
Then it succeeds
And the message used "[alias:alias]@[domain]" key for sending
# Need to find way to setup disabled address on black
@skip-black
Scenario: Disabled sender in combined mode fails to send
Given the account "[user:user]" has additional disabled address "[user:disabled]@[domain]"
And it succeeds
And bridge starts
And the user logs in with username "[user:user]" and password "password"
And it succeeds
When user "[user:user]" connects and authenticates SMTP client "1" with address "[user:user]@[domain]"
And SMTP client "1" sends the following message from "[alias:disabled]@[domain]" to "pm.bridge.qa@gmail.com":
"""
From: Bridge Test <[alias:disabled]@[domain]>
To: External Bridge <pm.bridge.qa@gmail.com>
hello
"""
Then it fails
# Need to find way to setup disabled address on black
@skip-black
Scenario: Disabled sender in split mode fails to send
Given the account "[user:user]" has additional disabled address "[alias:disabled]@[domain]"
And it succeeds
And bridge starts
And the user logs in with username "[user:user]" and password "password"
And the user sets the address mode of user "[user:user]" to "split"
And user "[user:user]" finishes syncing
And it succeeds
When user "[user:user]" connects and authenticates SMTP client "1" with address "[alias:alias]@[domain]"
And SMTP client "1" sends the following message from "[alias:disabled]@[domain]" to "pm.bridge.qa@gmail.com":
"""
From: Bridge Test <[alias:disabled]@[domain]>
To: External Bridge <pm.bridge.qa@gmail.com>
hello
"""
Then it fails