diff --git a/test/tests/parallel/set3/mta/smtp_delivery.bats b/test/tests/parallel/set3/mta/smtp_delivery.bats index 90e82f36..5e8bb263 100644 --- a/test/tests/parallel/set3/mta/smtp_delivery.bats +++ b/test/tests/parallel/set3/mta/smtp_delivery.bats @@ -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" { diff --git a/test/tests/serial/mail_pop3.bats b/test/tests/serial/mail_pop3.bats index cb07484a..7a055a63 100644 --- a/test/tests/serial/mail_pop3.bats +++ b/test/tests/serial/mail_pop3.bats @@ -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' { diff --git a/test/tests/serial/mail_with_imap.bats b/test/tests/serial/mail_with_imap.bats index 924e0c7f..bc648dd1 100644 --- a/test/tests/serial/mail_with_imap.bats +++ b/test/tests/serial/mail_with_imap.bats @@ -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' } diff --git a/test/tests/serial/mail_with_ldap.bats b/test/tests/serial/mail_with_ldap.bats index 8cab4ffc..b1c1750e 100644 --- a/test/tests/serial/mail_with_ldap.bats +++ b/test/tests/serial/mail_with_ldap.bats @@ -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' } diff --git a/test/tests/serial/tests.bats b/test/tests/serial/tests.bats index f3f87d10..7c6ce475 100644 --- a/test/tests/serial/tests.bats +++ b/test/tests/serial/tests.bats @@ -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 } #