aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional/cases/106_mid.robot
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/cases/106_mid.robot')
-rw-r--r--test/functional/cases/106_mid.robot42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/functional/cases/106_mid.robot b/test/functional/cases/106_mid.robot
new file mode 100644
index 000000000..7d8459dbd
--- /dev/null
+++ b/test/functional/cases/106_mid.robot
@@ -0,0 +1,42 @@
+*** Settings ***
+Suite Setup MID Setup
+Suite Teardown Normal Teardown
+Library ${TESTDIR}/lib/rspamd.py
+Resource ${TESTDIR}/lib/rspamd.robot
+Variables ${TESTDIR}/lib/vars.py
+
+*** Variables ***
+${CONFIG} ${TESTDIR}/configs/plugins.conf
+${RSPAMD_SCOPE} Suite
+${URL_TLD} ${TESTDIR}/../lua/unit/test_tld.dat
+
+*** Test Cases ***
+MID - invalid Message-ID
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/fws_fp.eml
+ Check Rspamc ${result} INVALID_MSGID (1.70)
+ Should Not Contain ${result.stdout} MISSING_MID
+ Should Not Contain ${result.stdout} INVALID_MSGID_ALLOWED
+
+MID - invalid Message-ID allowed
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/invalid_mid_allowed.eml
+ Check Rspamc ${result} INVALID_MSGID_ALLOWED (1.00)
+ Should Not Contain ${result.stdout} MISSING_MID
+ Should Not Contain ${result.stdout} INVALID_MSGID (
+
+MID - missing Message-ID
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/freemail.eml
+ Check Rspamc ${result} MISSING_MID (2.50)
+ Should Not Contain ${result.stdout} MISSING_MID_ALLOWED
+ Should Not Contain ${result.stdout} INVALID_MSGID
+
+MID - missing Message-ID allowed
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/onsubdomain_pass_relaxed.eml
+ Check Rspamc ${result} MISSING_MID_ALLOWED (1.00)
+ Should Not Contain ${result.stdout} MISSING_MID (
+ Should Not Contain ${result.stdout} INVALID_MSGID
+
+*** Keywords ***
+MID Setup
+ ${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/mid.conf
+ Set Suite Variable ${PLUGIN_CONFIG}
+ Generic Setup PLUGIN_CONFIG