commit eb35d6e: [Test] WHITELIST_SURBL for check

korgoth1 vladislav.stakhov at gmail.com
Mon Sep 9 19:28:04 UTC 2019


Author: korgoth1
Date: 2019-09-06 13:29:02 +0300
URL: https://github.com/rspamd/rspamd/commit/eb35d6e29dabacbb13f2733952d98fb271303637

[Test] WHITELIST_SURBL for check

---
 test/functional/cases/340_surbl.robot  | 4 ++++
 test/functional/configs/surbl.conf     | 5 +++--
 test/functional/messages/whitelist.eml | 4 ++++
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/test/functional/cases/340_surbl.robot b/test/functional/cases/340_surbl.robot
index a0cc4f943..232914932 100644
--- a/test/functional/cases/340_surbl.robot
+++ b/test/functional/cases/340_surbl.robot
@@ -92,6 +92,10 @@ SURBL example.com encoded url in subject
   Should Not Contain  ${result.stdout}  DBL_PHISH (
   Should Not Contain  ${result.stdout}  URIBL_BLACK (
 
+WHITELIST
+  ${result} =  Scan Message With Rspamc  ${TESTDIR}/messages/whitelist.eml
+  Should Contain  ${result.stdout}  RSPAMD_URIBL (
+
 *** Keywords ***
 Surbl Setup
   ${PLUGIN_CONFIG} =  Get File  ${TESTDIR}/configs/surbl.conf
diff --git a/test/functional/configs/surbl.conf b/test/functional/configs/surbl.conf
index 9752dcd1f..a4f22bb9f 100644
--- a/test/functional/configs/surbl.conf
+++ b/test/functional/configs/surbl.conf
@@ -1,4 +1,7 @@
 surbl {
+    "whitelist" = [
+    "rspamd-test.com"
+  ]
   rules {
     "RSPAMD_URIBL" {
       suffix = "test.uribl";
@@ -18,7 +21,6 @@ EOD;
       no_ip = true;
       check_emails = true;
       check_dkim = true;
-
       ips = {
         # spam domain
         DBL_SPAM = "127.0.1.2";
@@ -26,7 +28,6 @@ EOD;
         DBL_PHISH = "127.0.1.4";
       }
     }
-
     "URIBL_MULTI" {
       suffix = "test3.uribl";
       check_dkim = true;
diff --git a/test/functional/messages/whitelist.eml b/test/functional/messages/whitelist.eml
new file mode 100644
index 000000000..9b3ba2551
--- /dev/null
+++ b/test/functional/messages/whitelist.eml
@@ -0,0 +1,4 @@
+Content-Type: text/plain
+
+http://rspamd.com
+http://test.rspamd.example.com


More information about the Commits mailing list