mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-16 07:06:45 +00:00
Other(test): Fix integration test steps
This commit is contained in:
@ -155,7 +155,7 @@ func (t *testCtx) replace(value string) string {
|
|||||||
return t.userUUIDByName[name]
|
return t.userUUIDByName[name]
|
||||||
})
|
})
|
||||||
|
|
||||||
// Replace [addr:EMAIL] with a unique address for the email EMAIL.
|
// Replace [alias:EMAIL] with a unique address for the email EMAIL.
|
||||||
value = regexp.MustCompile(`\[alias:(\w+)\]`).ReplaceAllStringFunc(value, func(match string) string {
|
value = regexp.MustCompile(`\[alias:(\w+)\]`).ReplaceAllStringFunc(value, func(match string) string {
|
||||||
email := regexp.MustCompile(`\[alias:(\w+)\]`).FindStringSubmatch(match)[1]
|
email := regexp.MustCompile(`\[alias:(\w+)\]`).FindStringSubmatch(match)[1]
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ func (t *testCtx) replace(value string) string {
|
|||||||
return t.addrUUIDByName[email]
|
return t.addrUUIDByName[email]
|
||||||
})
|
})
|
||||||
|
|
||||||
// Replace {upper:VALUE} with VALUE in uppercase.
|
// Replace {toUpper:VALUE} with VALUE in uppercase.
|
||||||
value = regexp.MustCompile(`\{toUpper:([^}]+)\}`).ReplaceAllStringFunc(value, func(match string) string {
|
value = regexp.MustCompile(`\{toUpper:([^}]+)\}`).ReplaceAllStringFunc(value, func(match string) string {
|
||||||
return strings.ToUpper(regexp.MustCompile(`\{toUpper:([^}].+)\}`).FindStringSubmatch(match)[1])
|
return strings.ToUpper(regexp.MustCompile(`\{toUpper:([^}].+)\}`).FindStringSubmatch(match)[1])
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
Feature: A user can authenticate an IMAP client
|
Feature: A user can authenticate an IMAP client
|
||||||
Background:
|
Background:
|
||||||
Given there exists an account with username "[user:user]" and password "password"
|
Given there exists an account with username "[user:user]" and password "password"
|
||||||
And there exists an account with username "[user2:user2]" and password "password2"
|
And there exists an account with username "[user:user2]" and password "password2"
|
||||||
And the account "[user:user]" has additional address "[alias:alias]@[domain]"
|
And the account "[user:user]" has additional address "[alias:alias]@[domain]"
|
||||||
And the account "[user2:user2]" has additional disabled address "[alias2:alias2]@[domain]"
|
And the account "[user:user2]" has additional disabled address "[alias:alias2]@[domain]"
|
||||||
And bridge starts
|
And bridge starts
|
||||||
And the user logs in with username "[user:user]" and password "password"
|
And the user logs in with username "[user:user]" and password "password"
|
||||||
And the user logs in with username "[user2:user2]" and password "password2"
|
And the user logs in with username "[user:user2]" and password "password2"
|
||||||
|
|
||||||
Scenario: IMAP client can authenticate successfully
|
Scenario: IMAP client can authenticate successfully
|
||||||
When user "[user:user]" connects IMAP client "1"
|
When user "[user:user]" connects IMAP client "1"
|
||||||
@ -20,7 +20,7 @@ Feature: A user can authenticate an IMAP client
|
|||||||
Given user "[user:user]" connects and authenticates IMAP client "1" with address "[alias:alias]@[domain]"
|
Given user "[user:user]" connects and authenticates IMAP client "1" with address "[alias:alias]@[domain]"
|
||||||
|
|
||||||
Scenario: IMAP client can not authenticate successfully with disable address
|
Scenario: IMAP client can not authenticate successfully with disable address
|
||||||
Given user "[user2:user2]" connects and can not authenticate IMAP client "1" with address "[alias2:alias2]@[domain]"
|
Given user "[user:user2]" connects and can not authenticate IMAP client "1" with address "[alias:alias2]@[domain]"
|
||||||
|
|
||||||
Scenario: IMAP client can authenticate successfully
|
Scenario: IMAP client can authenticate successfully
|
||||||
When user "[user:user]" connects IMAP client "1"
|
When user "[user:user]" connects IMAP client "1"
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
Feature: A user can authenticate an SMTP client
|
Feature: A user can authenticate an SMTP client
|
||||||
Background:
|
Background:
|
||||||
Given there exists an account with username "[user:user]" and password "password"
|
Given there exists an account with username "[user:user]" and password "password"
|
||||||
And there exists an account with username "[user2:user2]" and password "password2"
|
And there exists an account with username "[user:user2]" and password "password2"
|
||||||
And there exists a disabled account with username "[user3:user3]" and password "password3"
|
And there exists a disabled account with username "[user3:user3]" and password "password3"
|
||||||
And the account "[user:user]" has additional address "[alias:alias]@[domain]"
|
And the account "[user:user]" has additional address "[alias:alias]@[domain]"
|
||||||
And the account "[user2:user2]" has additional disabled address "[alias2:alias2]@[domain]"
|
And the account "[user:user2]" has additional disabled address "[alias:alias2]@[domain]"
|
||||||
And the account "[user3:user3]" has additional address "[alias3:alias3]@[domain]"
|
And the account "[user3:user3]" has additional address "[alias3:alias3]@[domain]"
|
||||||
And bridge starts
|
And bridge starts
|
||||||
And the user logs in with username "[user:user]" and password "password"
|
And the user logs in with username "[user:user]" and password "password"
|
||||||
And the user logs in with username "[user2:user2]" and password "password2"
|
And the user logs in with username "[user:user2]" and password "password2"
|
||||||
And the user logs in with username "[user3:user3]" and password "password3"
|
And the user logs in with username "[user3:user3]" and password "password3"
|
||||||
|
|
||||||
Scenario: SMTP client can authenticate successfully
|
Scenario: SMTP client can authenticate successfully
|
||||||
@ -33,7 +33,7 @@ Feature: A user can authenticate an SMTP client
|
|||||||
Then it succeeds
|
Then it succeeds
|
||||||
|
|
||||||
Scenario: SMTP client can not authenticate with disabled address
|
Scenario: SMTP client can not authenticate with disabled address
|
||||||
When user "[user2:user2]" connects and authenticates SMTP client "1" with address "[alias2:alias2]@[domain]"
|
When user "[user:user2]" connects and authenticates SMTP client "1" with address "[alias:alias2]@[domain]"
|
||||||
Then it fails
|
Then it fails
|
||||||
|
|
||||||
Scenario: SMTP Logs out user
|
Scenario: SMTP Logs out user
|
||||||
@ -44,7 +44,7 @@ Feature: A user can authenticate an SMTP client
|
|||||||
Scenario: SMTP client can authenticate two users
|
Scenario: SMTP client can authenticate two users
|
||||||
When user "[user:user]" connects SMTP client "1"
|
When user "[user:user]" connects SMTP client "1"
|
||||||
Then SMTP client "1" can authenticate
|
Then SMTP client "1" can authenticate
|
||||||
When user "[user2:user2]" connects SMTP client "2"
|
When user "[user:user2]" connects SMTP client "2"
|
||||||
Then SMTP client "2" can authenticate
|
Then SMTP client "2" can authenticate
|
||||||
|
|
||||||
@ignore-live
|
@ignore-live
|
||||||
|
|||||||
Reference in New Issue
Block a user