commit 925e2c9: [Test] Fix tests
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Aug 17 13:42:07 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-08-17 14:41:39 +0100
URL: https://github.com/rspamd/rspamd/commit/925e2c9fef46a7556c4ec58ceb91984b5a10b7c8 (HEAD -> master)
[Test] Fix tests
---
test/functional/cases/280_rules.robot | 13 +++++++------
test/functional/configs/regexp.conf | 6 ++++++
test/functional/messages/phish_sender2.eml | 2 +-
test/functional/messages/phish_sender4.eml | 2 +-
4 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/test/functional/cases/280_rules.robot b/test/functional/cases/280_rules.robot
index 4308c8d78..6c5c1ac62 100644
--- a/test/functional/cases/280_rules.robot
+++ b/test/functional/cases/280_rules.robot
@@ -66,7 +66,7 @@ BITCOIN ADDR 2
BITCOIN ADDR 3
${result} = Scan Message With Rspamc ${TESTDIR}/messages/btc3.eml
- Should Contain ${result.stdout} BITCOIN_ADDR
+ Should Contain ${result.stdout} BITCOIN_ADDR
RCVD_COUNT_ONE
${result} = Scan Message With Rspamc ${TESTDIR}/messages/btc.eml
@@ -91,23 +91,24 @@ PHISH_SENDER_A
PHISH_SENDER_B
${result} = Scan Message With Rspamc ${TESTDIR}/messages/phish_sender2.eml
- Should Contain ${result.stdout} SOMETHING
+ Should Contain ${result.stdout} BROKEN_HEADERS
PHISH_SENDER_C
${result} = Scan Message With Rspamc ${TESTDIR}/messages/phish_sender3.eml
- Should Contain ${result.stdout} SOMETHING
+ Should Contain ${result.stdout} BROKEN_HEADERS
PHISH_SENDER_D
${result} = Scan Message With Rspamc ${TESTDIR}/messages/phish_sender4.eml
- Should Contain ${result.stdout} SOMETHING
+ Should Contain ${result.stdout} BROKEN_HEADERS
PHISH_SENDER_E
${result} = Scan Message With Rspamc ${TESTDIR}/messages/phish_sender5.eml
- Should Contain ${result.stdout} SOMETHING
+ Should Contain ${result.stdout} MULTIPLE_FROM
+ Should Contain ${result.stdout} DMARC_NA (0.00)[Duplicate From header]
PHISH_SENDER_ROUTING_PART
${result} = Scan Message With Rspamc ${TESTDIR}/messages/phish_sender6.eml
- Should Contain ${result.stdout} SOMETHING
+ Should Contain ${result.stdout} FROM_INVALID
*** Keywords ***
Rules Setup
diff --git a/test/functional/configs/regexp.conf b/test/functional/configs/regexp.conf
index 381fa0ea4..5b4047b5b 100644
--- a/test/functional/configs/regexp.conf
+++ b/test/functional/configs/regexp.conf
@@ -52,5 +52,11 @@ regexp {
options {
dynamic_conf = "${TESTDIR}/configs/dynamic.conf";
}
+dmarc { }
+spf { }
+dkim { }
+modules {
+ path = "${TESTDIR}/../../src/plugins/lua/"
+}
lua = "${TESTDIR}/lua/regex_test.lua"
diff --git a/test/functional/messages/phish_sender2.eml b/test/functional/messages/phish_sender2.eml
index a81e8f291..1cb96882f 100644
--- a/test/functional/messages/phish_sender2.eml
+++ b/test/functional/messages/phish_sender2.eml
@@ -1,7 +1,7 @@
Received: by mail-lf1-f54.gulugulu.com with SMTP id j14so14439709lfg.9
for <test at test.ru>; Mon, 27 Apr 2020 09:54:21 -0700 (PDT)
From
-: <any at attack.com>
+ : <any at attack.com>
From: <admin at legitimate.com>
Date: Mon, 27 Apr 2020 19:54:10 +0300
Message-ID: <CA+1S=h4aGimA6vSBJF=t1F+5z-Mua5+Cimf+NU_NDWJk8ZNOcw at mail.gmail.com>
diff --git a/test/functional/messages/phish_sender4.eml b/test/functional/messages/phish_sender4.eml
index 639f8d61f..64830fe3b 100644
--- a/test/functional/messages/phish_sender4.eml
+++ b/test/functional/messages/phish_sender4.eml
@@ -1,7 +1,7 @@
Received: by mail-lf1-f54.gulugulu.com with SMTP id j14so14439709lfg.9
for <test at test.ru>; Mon, 27 Apr 2020 09:54:21 -0700 (PDT)
From
-: <any at attack.com>
+ : <any at attack.com>
Sender: <admin at legitimate.com>
Date: Mon, 27 Apr 2020 19:54:10 +0300
Message-ID: <CA+1S=h4aGimA6vSBJF=t1F+5z-Mua5+Cimf+NU_NDWJk8ZNOcw at mail.gmail.com>
More information about the Commits
mailing list