mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-03 09:34:33 +02:00
scripts: perform additional checks when updating/adding/deletting accounts (#4033)
* normalize accounts to lowercase * update CHANGELOG * add test to verify bug fix works correctly
This commit is contained in:
parent
4119849284
commit
b222035112
3 changed files with 25 additions and 0 deletions
|
@ -74,6 +74,19 @@ function teardown_file() { _default_teardown ; }
|
|||
__should_add_new_user 'user3@domain.tld'
|
||||
}
|
||||
|
||||
@test "should add new user 'USeRx@domain.tld' as 'userx@domain.tld' into 'postfix-accounts.cf' and log a warning" {
|
||||
local MAIL_ACCOUNT='USeRx@domain.tld'
|
||||
local NORMALIZED_MAIL_ACCOUNT='userx@domain.tld'
|
||||
|
||||
_run_in_container setup email add "${MAIL_ACCOUNT}" mypassword
|
||||
assert_success
|
||||
assert_output --partial "'USeRx@domain.tld' has uppercase letters and will be normalized to 'userx@domain.tld'"
|
||||
|
||||
__check_mail_account_exists "${NORMALIZED_MAIL_ACCOUNT}"
|
||||
assert_success
|
||||
assert_output "${NORMALIZED_MAIL_ACCOUNT}"
|
||||
}
|
||||
|
||||
# To catch mistakes from substring matching:
|
||||
@test "should add new user 'auser3@domain.tld' into 'postfix-accounts.cf'" {
|
||||
__should_add_new_user 'auser3@domain.tld'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue