commit bd59acd: [Test] Fix tests relying on the broken behaviour

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Feb 7 22:00:05 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-02-07 21:58:39 +0000
URL: https://github.com/rspamd/rspamd/commit/bd59acda6a52b5eb86e3c6b9f5fb8019ce5dd813 (HEAD -> master)

[Test] Fix tests relying on the broken behaviour

---
 lualib/rspamadm/mime.lua                 |  2 +-
 test/functional/cases/102_multimap.robot | 11 ++++++-----
 test/functional/configs/multimap.conf    |  2 +-
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/lualib/rspamadm/mime.lua b/lualib/rspamadm/mime.lua
index 6765c9e43..2e0c0c4bf 100644
--- a/lualib/rspamadm/mime.lua
+++ b/lualib/rspamadm/mime.lua
@@ -765,7 +765,7 @@ local function modify_handler(opts)
     end
 
     -- End of headers
-    local eoh_pos = #out
+    --local eoh_pos = #out
     out[#out + 1] = ''
 
     local boundaries = {}
diff --git a/test/functional/cases/102_multimap.robot b/test/functional/cases/102_multimap.robot
index 3b0995d56..5c0dce781 100644
--- a/test/functional/cases/102_multimap.robot
+++ b/test/functional/cases/102_multimap.robot
@@ -280,11 +280,12 @@ MAP - RECEIVED - IP MINMAX POS - ONE
   Check Rspamc  ${result}  RCVD_TEST_01
   Check Rspamc  ${result}  RCVD_TEST_02  inverse=1
 
-MAP - RECEIVED - IP MINMAX POS - TWO / RCVD_AUTHED_ONE HIT
-  ${result} =  Scan Message With Rspamc  ${RCVD2}
-  Check Rspamc  ${result}  RCVD_TEST_02
-  Should Not Contain  ${result.stdout}  RCVD_TEST_01
-  Should Contain  ${result.stdout}  RCVD_AUTHED_ONE
+# Relies on parsing of shitty received
+#MAP - RECEIVED - IP MINMAX POS - TWO / RCVD_AUTHED_ONE HIT
+#  ${result} =  Scan Message With Rspamc  ${RCVD2}
+#  Check Rspamc  ${result}  RCVD_TEST_02
+#  Should Not Contain  ${result.stdout}  RCVD_TEST_01
+#  Should Contain  ${result.stdout}  RCVD_AUTHED_ONE
 
 MAP - RECEIVED - REDIS
   Redis HSET  RCVD_TEST  2a01:7c8:aab6:26d:5054:ff:fed1:1da2  ${EMPTY}
diff --git a/test/functional/configs/multimap.conf b/test/functional/configs/multimap.conf
index 61bd310a8..77326f26c 100644
--- a/test/functional/configs/multimap.conf
+++ b/test/functional/configs/multimap.conf
@@ -139,7 +139,7 @@ multimap {
   }
   RCVD_TEST_02 {
     type = "received";
-    min_pos = -2;
+    min_pos = -1;
     map = "${TESTDIR}/configs/maps/rcvd.list";
   }
   RCVD_TEST_REDIS_01 {


More information about the Commits mailing list