From 5b9908bd04cecc49366c842e26af37393e4acedb Mon Sep 17 00:00:00 2001 From: Alexander Elbracht Date: Tue, 9 May 2017 16:16:37 +0200 Subject: [PATCH] Add integration tests for spam subject tag --- Makefile | 1 + test/tests.bats | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 286fe70b..c26670f1 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,7 @@ run: -e SA_TAG=-5.0 \ -e SA_TAG2=2.0 \ -e SA_KILL=3.0 \ + -e SA_SPAM_SUBJECT="SPAM: " \ -e VIRUSMAILS_DELETE_DELAY=7 \ -e SASL_PASSWD="external-domain.com username:password" \ -e ENABLE_MANAGESIEVE=1 \ diff --git a/test/tests.bats b/test/tests.bats index 27dbc56f..d0abf268 100644 --- a/test/tests.bats +++ b/test/tests.bats @@ -424,6 +424,8 @@ load 'test_helper/bats-assert/load' assert_success run docker exec mail_pop3 /bin/sh -c "grep '\$sa_kill_level_deflt' /etc/amavis/conf.d/20-debian_defaults | grep '= 6.31'" assert_success + run docker exec mail_pop3 /bin/sh -c "grep '\$sa_spam_subject_tag' /etc/amavis/conf.d/20-debian_defaults | grep '= .\*\*\*SPAM\*\*\* .'" + assert_success } @test "checking spamassassin: docker env variables are set correctly (custom)" { @@ -433,6 +435,8 @@ load 'test_helper/bats-assert/load' assert_success run docker exec mail /bin/sh -c "grep '\$sa_kill_level_deflt' /etc/amavis/conf.d/20-debian_defaults | grep '= 3.0'" assert_success + run docker exec mail /bin/sh -c "grep '\$sa_spam_subject_tag' /etc/amavis/conf.d/20-debian_defaults | grep '= .SPAM: .'" + assert_success } @test "checking spamassassin: all registered domains should see spam headers" {