aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional/cases/280_rules.robot
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-13 18:08:22 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-13 18:08:22 +0000
commitcf6ff4df42cb4166b402ba20488c47254a20ba57 (patch)
tree94ba25741b46be80879c695c761f128437a3f638 /test/functional/cases/280_rules.robot
parent18c8f28606d6beb2e2fc2bcd177bddef139752be (diff)
downloadrspamd-cf6ff4df42cb4166b402ba20488c47254a20ba57.tar.gz
rspamd-cf6ff4df42cb4166b402ba20488c47254a20ba57.zip
[Test] Add tests for #2584 and #2349
Diffstat (limited to 'test/functional/cases/280_rules.robot')
-rw-r--r--test/functional/cases/280_rules.robot39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/functional/cases/280_rules.robot b/test/functional/cases/280_rules.robot
new file mode 100644
index 000000000..36dc4d63d
--- /dev/null
+++ b/test/functional/cases/280_rules.robot
@@ -0,0 +1,39 @@
+*** Settings ***
+Test Setup Rules Setup
+Test Teardown Rules Teardown
+Library ${TESTDIR}/lib/rspamd.py
+Resource ${TESTDIR}/lib/rspamd.robot
+Variables ${TESTDIR}/lib/vars.py
+
+*** Variables ***
+${CONFIG} ${TESTDIR}/configs/plugins.conf
+${MESSAGE1} ${TESTDIR}/messages/fws_fn.eml
+${MESSAGE2} ${TESTDIR}/messages/fws_fp.eml
+${MESSAGE3} ${TESTDIR}/messages/fws_tp.eml
+${URL_TLD} ${TESTDIR}/../lua/unit/test_tld.dat
+${RSPAMD_SCOPE} Test
+
+
+*** Test Cases ***
+Broken MIME
+ ${result} = Scan Message With Rspamc ${MESSAGE3}
+ Check Rspamc ${result} MISSING_SUBJECT
+
+Issue 2584
+ ${result} = Scan Message With Rspamc ${MESSAGE1}
+ Check Rspamc ${result} BROKEN_CONTENT_TYPE inverse=1
+ Should Not Contain ${result.stdout} MISSING_SUBJECT
+ Should Not Contain ${result.stdout} R_MISSING_CHARSET
+
+Issue 2349
+ ${result} = Scan Message With Rspamc ${MESSAGE2}
+ Check Rspamc ${result} MULTIPLE_UNIQUE_HEADERS inverse=1
+
+*** Keywords ***
+Rules Setup
+ ${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/regexp.conf
+ Set Suite Variable ${PLUGIN_CONFIG}
+ Generic Setup PLUGIN_CONFIG
+
+Rules Teardown
+ Normal Teardown