added additional asserts
This commit is contained in:
parent
5212bd4668
commit
aa0a16b4c9
|
@ -84,13 +84,21 @@ function setup_file() {
|
|||
|
||||
# Required for 'delivers mail to existing account':
|
||||
_send_email --data 'existing/user1'
|
||||
assert_success
|
||||
_send_email --to user2@otherdomain.tld --data 'existing/user2'
|
||||
assert_success
|
||||
_send_email --to user3@localhost.localdomain --data 'existing/user3'
|
||||
assert_success
|
||||
_send_email --to added@localhost.localdomain --data 'existing/added'
|
||||
assert_success
|
||||
_send_email --to user1@localhost.localdomain --data 'existing/user-and-cc-local-alias'
|
||||
assert_success
|
||||
_send_email --data 'sieve/spam-folder'
|
||||
assert_success
|
||||
_send_email --to user2@otherdomain.tld --data 'sieve/pipe'
|
||||
assert_success
|
||||
_run_in_container_bash 'sendmail root < /tmp/docker-mailserver-test/emails/sendmail/root-email.txt'
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "should succeed at emptying mail queue" {
|
||||
|
|
|
@ -25,10 +25,12 @@ function teardown_file() { _default_teardown ; }
|
|||
|
||||
@test 'authentication works' {
|
||||
_send_email 'auth/pop3-auth' '-w 1 0.0.0.0 110'
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test 'added user authentication works' {
|
||||
_send_email 'auth/added-pop3-auth' '-w 1 0.0.0.0 110'
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test '/var/log/mail/mail.log is error-free' {
|
||||
|
|
|
@ -22,6 +22,7 @@ function teardown_file() { _default_teardown ; }
|
|||
|
||||
@test '(Dovecot) LDAP RIMAP connection and authentication works' {
|
||||
_send_email 'auth/imap-auth' '-w 1 0.0.0.0 143'
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test '(SASLauthd) SASL RIMAP authentication works' {
|
||||
|
@ -32,11 +33,14 @@ function teardown_file() { _default_teardown ; }
|
|||
@test '(SASLauthd) RIMAP SMTP authentication works' {
|
||||
_nc_wrapper 'auth/smtp-auth-login.txt' '-w 5 0.0.0.0 25'
|
||||
assert_output --partial 'Error: authentication not enabled'
|
||||
assert_failure
|
||||
|
||||
_nc_wrapper 'auth/smtp-auth-login.txt' '-w 5 0.0.0.0 465'
|
||||
assert_success
|
||||
assert_output --partial 'Authentication successful'
|
||||
|
||||
_nc_wrapper 'auth/smtp-auth-login.txt' '-w 5 0.0.0.0 587'
|
||||
assert_success
|
||||
assert_output --partial 'Authentication successful'
|
||||
}
|
||||
|
||||
|
|
|
@ -370,13 +370,16 @@ function teardown() {
|
|||
# Requires ENV `PERMIT_DOCKER=container`
|
||||
_nc_wrapper 'auth/sasl-ldap-smtp-auth.txt' '-w 5 0.0.0.0 25'
|
||||
assert_output --partial 'Error: authentication not enabled'
|
||||
assert_failure
|
||||
|
||||
# do not use _send_email here
|
||||
_run_in_container_bash 'openssl s_client -quiet -connect 0.0.0.0:465 < /tmp/docker-mailserver-test/auth/sasl-ldap-smtp-auth.txt'
|
||||
assert_success
|
||||
assert_output --partial 'Authentication successful'
|
||||
|
||||
# do not use _send_email here
|
||||
_run_in_container_bash 'openssl s_client -quiet -starttls smtp -connect 0.0.0.0:587 < /tmp/docker-mailserver-test/auth/sasl-ldap-smtp-auth.txt'
|
||||
assert_success
|
||||
assert_output --partial 'Authentication successful'
|
||||
}
|
||||
|
||||
|
|
|
@ -81,10 +81,12 @@ function teardown_file() { _default_teardown ; }
|
|||
|
||||
@test "imap: authentication works" {
|
||||
_send_email 'auth/imap-auth' '-w 1 0.0.0.0 143'
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "imap: added user authentication works" {
|
||||
_send_email 'auth/added-imap-auth' '-w 1 0.0.0.0 143'
|
||||
assert_success
|
||||
}
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue