aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional/cases/340_surbl.robot
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-24 19:08:30 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-24 19:08:30 +0100
commit91443f3b8aba3abe7d0a5cef117c236a2aa8f4da (patch)
tree6f3d60c3ed622973def5cce6138ae2ca360e20f3 /test/functional/cases/340_surbl.robot
parentc801fdefc50255b6ab3c5fdb38376846eb0fa6f0 (diff)
downloadrspamd-91443f3b8aba3abe7d0a5cef117c236a2aa8f4da.tar.gz
rspamd-91443f3b8aba3abe7d0a5cef117c236a2aa8f4da.zip
[Test] Add SURBL tests
Diffstat (limited to 'test/functional/cases/340_surbl.robot')
-rw-r--r--test/functional/cases/340_surbl.robot52
1 files changed, 52 insertions, 0 deletions
diff --git a/test/functional/cases/340_surbl.robot b/test/functional/cases/340_surbl.robot
new file mode 100644
index 000000000..40ef9855c
--- /dev/null
+++ b/test/functional/cases/340_surbl.robot
@@ -0,0 +1,52 @@
+*** Settings ***
+Suite Setup Surbl Setup
+Suite Teardown Surbl 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 ***
+SURBL Example.com domain
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/url4.eml
+ Should Contain ${result.stdout} RSPAMD_URIBL
+ Should Contain ${result.stdout} DBL_SPAM
+ Should Not Contain ${result.stdout} DBL_PHISH
+ Should Not Contain ${result.stdout} URIBL_BLACK
+
+SURBL Example.net domain
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/url5.eml
+ Should Contain ${result.stdout} DBL_PHISH
+ Should Not Contain ${result.stdout} DBL_SPAM
+ Should Not Contain ${result.stdout} RSPAMD_URIBL
+ Should Not Contain ${result.stdout} URIBL_BLACK
+
+SURBL Example.org domain
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/url6.eml
+ Should Contain ${result.stdout} URIBL_BLACK
+ Should Not Contain ${result.stdout} DBL_SPAM
+ Should Not Contain ${result.stdout} RSPAMD_URIBL
+ Should Not Contain ${result.stdout} DBL_PHISH
+
+SURBL Example.ru domain
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/url7.eml
+ Should Contain ${result.stdout} URIBL_GREY
+ Should Contain ${result.stdout} URIBL_RED
+ Should Not Contain ${result.stdout} DBL_SPAM
+ Should Not Contain ${result.stdout} RSPAMD_URIBL
+ Should Not Contain ${result.stdout} DBL_PHISH
+ Should Not Contain ${result.stdout} URIBL_BLACK
+
+*** Keywords ***
+Surbl Setup
+ ${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/surbl.conf
+ Set Suite Variable ${PLUGIN_CONFIG}
+ Generic Setup PLUGIN_CONFIG
+
+Surbl Teardown
+ Normal Teardown
+ Terminate All Processes kill=True \ No newline at end of file