commit d215914: [Test] Add classifier symbols to the tests

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Jun 10 17:14:11 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-06-10 13:47:35 +0100
URL: https://github.com/rspamd/rspamd/commit/d21591455e25e9f31ae488fab9a0bb563fb33e85

[Test] Add classifier symbols to the tests

---
 test/functional/cases/108_settings.robot | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/test/functional/cases/108_settings.robot b/test/functional/cases/108_settings.robot
index 9011ad7b3..d414ed151 100644
--- a/test/functional/cases/108_settings.robot
+++ b/test/functional/cases/108_settings.robot
@@ -30,22 +30,32 @@ NO SETTINGS HAM
   Should Contain  ${result.stdout}  BAYES_HAM
 
 ENABLE SYMBOL - NORMAL
-  ${result} =  Scan Message With Rspamc  ${MESSAGE}  --header  Settings={symbols_enabled = ["SIMPLE_TEST"]}
+  ${result} =  Scan Message With Rspamc  ${HAM_MESSAGE}  --header  Settings={symbols_enabled = ["SIMPLE_TEST"]}
   Check Rspamc  ${result}  SIMPLE_TEST
   Should Not Contain  ${result.stdout}  SIMPLE_PRE
   Should Not Contain  ${result.stdout}  SIMPLE_POST
+  Should Not Contain  ${result.stdout}  BAYES_HAM
 
 ENABLE SYMBOL - POSTFILTER
-  ${result} =  Scan Message With Rspamc  ${MESSAGE}  --header  Settings={symbols_enabled = ["SIMPLE_TEST", "SIMPLE_POST"]}
+  ${result} =  Scan Message With Rspamc  ${HAM_MESSAGE}  --header  Settings={symbols_enabled = ["SIMPLE_TEST", "SIMPLE_POST"]}
   Check Rspamc  ${result}  SIMPLE_TEST
   Should Contain  ${result.stdout}  SIMPLE_POST
   Should Not Contain  ${result.stdout}  SIMPLE_PRE
+  Should Not Contain  ${result.stdout}  BAYES_HAM
 
 ENABLE SYMBOL - PREFILTER
-  ${result} =  Scan Message With Rspamc  ${MESSAGE}  --header  Settings={symbols_enabled = ["SIMPLE_PRE"]}
+  ${result} =  Scan Message With Rspamc  ${HAM_MESSAGE}  --header  Settings={symbols_enabled = ["SIMPLE_PRE"]}
   Check Rspamc  ${result}  SIMPLE_PRE
   Should Not Contain  ${result.stdout}  SIMPLE_POST
   Should Not Contain  ${result.stdout}  SIMPLE_TEST
+  Should Not Contain  ${result.stdout}  BAYES_HAM
+
+ENABLE SYMBOL - CLASSIFIER
+  ${result} =  Scan Message With Rspamc  ${HAM_MESSAGE}  --header  Settings={symbols_enabled = ["BAYES_HAM", "BAYES_SPAM"]}
+  Check Rspamc  ${result}  BAYES_HAM
+  Should Not Contain  ${result.stdout}  SIMPLE_PRE
+  Should Not Contain  ${result.stdout}  SIMPLE_POST
+  Should Not Contain  ${result.stdout}  SIMPLE_TEST
 
 DISABLE SYMBOL - NORMAL
   ${result} =  Scan Message With Rspamc  ${MESSAGE}  --header  Settings={symbols_disabled = ["SIMPLE_TEST"]}


More information about the Commits mailing list