1
0
mirror of https://github.com/docker-mailserver/docker-mailserver.git synced 2025-08-08 23:06:49 +02:00

update BATS & helper + minor updates to BATS variables (#2988)

This commit is contained in:
Georg Lauterbach
2023-01-09 08:54:04 +01:00
committed by GitHub
parent 2b4105ef0a
commit 41c44cb91d
24 changed files with 137 additions and 136 deletions

View File

@ -1,7 +1,7 @@
load "${REPOSITORY_ROOT}/test/helper/setup"
load "${REPOSITORY_ROOT}/test/helper/common"
TEST_NAME_PREFIX='[ClamAV + SA] (disabled):'
BATS_TEST_NAME_PREFIX='[ClamAV + SA] (disabled) '
CONTAINER_NAME='dms-test_clamav-spamassasin_disabled'
function setup_file() {
@ -24,22 +24,22 @@ function setup_file() {
function teardown_file() { _default_teardown ; }
@test "${TEST_NAME_PREFIX} ClamAV - should be disabled by ENV 'ENABLED_CLAMAV=0'" {
@test "ClamAV - should be disabled by ENV 'ENABLED_CLAMAV=0'" {
run check_if_process_is_running 'clamd'
assert_failure
}
@test "${TEST_NAME_PREFIX} ClamAV - Amavis integration should not be active" {
@test "ClamAV - Amavis integration should not be active" {
_run_in_container grep -i 'Found secondary av scanner ClamAV-clamscan' /var/log/mail/mail.log
assert_failure
}
@test "${TEST_NAME_PREFIX} SA - Amavis integration should not be active" {
@test "SA - Amavis integration should not be active" {
_run_in_container bash -c "grep -i 'ANTI-SPAM-SA code' /var/log/mail/mail.log | grep 'NOT loaded'"
assert_success
}
@test "${TEST_NAME_PREFIX} SA - should not have been called" {
@test "SA - should not have been called" {
_run_in_container grep -i 'connect to /var/run/clamav/clamd.ctl failed' /var/log/mail/mail.log
assert_failure
}