Other(test): Fix integration test steps

This commit is contained in:
James Houlahan
2023-01-17 14:38:37 +01:00
parent 7119c566ef
commit 1d405076e6
3 changed files with 11 additions and 11 deletions

View File

@ -155,7 +155,7 @@ func (t *testCtx) replace(value string) string {
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 {
email := regexp.MustCompile(`\[alias:(\w+)\]`).FindStringSubmatch(match)[1]
@ -167,7 +167,7 @@ func (t *testCtx) replace(value string) string {
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 {
return strings.ToUpper(regexp.MustCompile(`\{toUpper:([^}].+)\}`).FindStringSubmatch(match)[1])
})

View File

@ -1,12 +1,12 @@
Feature: A user can authenticate an IMAP client
Background:
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 "[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 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
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]"
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
When user "[user:user]" connects IMAP client "1"

View File

@ -1,14 +1,14 @@
Feature: A user can authenticate an SMTP client
Background:
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 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 bridge starts
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"
Scenario: SMTP client can authenticate successfully
@ -33,7 +33,7 @@ Feature: A user can authenticate an SMTP client
Then it succeeds
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
Scenario: SMTP Logs out user
@ -44,7 +44,7 @@ Feature: A user can authenticate an SMTP client
Scenario: SMTP client can authenticate two users
When user "[user:user]" connects SMTP client "1"
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
@ignore-live