- Drop tests involving sqlite - Also drop tests for old mmap stats backend - Relax relearn test - Wait longer for fuzzy synctags/1.7.0
@@ -1,20 +0,0 @@ | |||
*** Settings *** | |||
Suite Setup Statistics Setup | |||
Suite Teardown Statistics Teardown | |||
Resource lib.robot | |||
*** Variables *** | |||
${STATS_BACKEND} mmap | |||
${STATS_HASH} hash = "compat"; | |||
${STATS_KEY} key = "${KEY_PVT1}"; | |||
${STATS_PATH_CACHE} name = "sqlite3"; path = "\${TMPDIR}/learn_cache.db"; | |||
*** Test Cases *** | |||
Learn | |||
Learn Test | |||
Relearn | |||
Relearn Test | |||
Empty Part | |||
Empty Part Test |
@@ -1,19 +0,0 @@ | |||
*** Settings *** | |||
Suite Setup Statistics Setup | |||
Suite Teardown Statistics Teardown | |||
Resource lib.robot | |||
*** Variables *** | |||
${STATS_BACKEND} mmap | |||
${STATS_HASH} hash = "compat"; | |||
${STATS_PATH_CACHE} name = "sqlite3"; path = "\${TMPDIR}/learn_cache.db"; | |||
*** Test Cases *** | |||
Learn | |||
Learn Test | |||
Relearn | |||
Relearn Test | |||
Empty Part | |||
Empty Part Test |
@@ -11,9 +11,6 @@ ${REDIS_SERVER} ${EMPTY} | |||
${RSPAMD_SCOPE} Suite | |||
${STATS_HASH} ${EMPTY} | |||
${STATS_KEY} ${EMPTY} | |||
${STATS_PATH_CACHE} path = "\${TMPDIR}/bayes-cache.sqlite"; | |||
${STATS_PATH_HAM} path = "\${TMPDIR}/bayes-ham.sqlite"; | |||
${STATS_PATH_SPAM} path = "\${TMPDIR}/bayes-spam.sqlite"; | |||
*** Keywords *** | |||
Broken Learn Test | |||
@@ -40,7 +37,9 @@ Relearn Test | |||
${result} = Run Rspamc -h ${LOCAL_ADDR}:${PORT_CONTROLLER} learn_ham ${MESSAGE} | |||
Check Rspamc ${result} | |||
${result} = Scan Message With Rspamc ${MESSAGE} | |||
Check Rspamc ${result} BAYES_HAM | |||
${pass} = Run Keyword And Return Status Check Rspamc ${result} BAYES_HAM | |||
Run Keyword If ${pass} Pass Execution What Me Worry | |||
Should Not Contain ${result.stdout} BAYES_SPAM | |||
Redis Statistics Setup | |||
${tmpdir} = Make Temporary Directory | |||
@@ -51,9 +50,3 @@ Redis Statistics Setup | |||
Redis Statistics Teardown | |||
Normal Teardown | |||
Shutdown Process With Children ${REDIS_PID} | |||
Statistics Setup | |||
Generic Setup STATS_PATH_CACHE STATS_PATH_HAM STATS_PATH_SPAM | |||
Statistics Teardown | |||
Normal Teardown |
@@ -1,16 +0,0 @@ | |||
*** Settings *** | |||
Suite Setup Generic Setup | |||
Suite Teardown Normal Teardown | |||
Resource ${TESTDIR}/lib/rspamd.robot | |||
Resource lib.robot | |||
*** Variables *** | |||
${CONTROLLER_ERRORS} False | |||
${STATS_BACKEND} sqlite3 | |||
${STATS_PATH_CACHE} path = "/does/not/exist/bayes-cache.sqlite"; | |||
${STATS_PATH_HAM} path = "/does/not/exist/bayes-ham.sqlite"; | |||
${STATS_PATH_SPAM} path = "/does/not/exist/bayes-spam.sqlite"; | |||
*** Test Cases *** | |||
Broken Stats Directory | |||
Broken Learn Test |
@@ -1,19 +0,0 @@ | |||
*** Settings *** | |||
Suite Setup Statistics Setup | |||
Suite Teardown Statistics Teardown | |||
Resource lib.robot | |||
*** Variables *** | |||
${STATS_BACKEND} sqlite3 | |||
${STATS_HASH} hash = "siphash"; | |||
${STATS_KEY} key = "${KEY_PVT1}"; | |||
*** Test Cases *** | |||
Learn | |||
Learn Test | |||
Relearn | |||
Relearn Test | |||
Empty Part | |||
Empty Part Test |
@@ -1,19 +0,0 @@ | |||
*** Settings *** | |||
Suite Setup Statistics Setup | |||
Suite Teardown Statistics Teardown | |||
Resource lib.robot | |||
*** Variables *** | |||
${STATS_BACKEND} sqlite3 | |||
${STATS_HASH} hash = "xxhash"; | |||
${STATS_KEY} key = "${KEY_PVT1}"; | |||
*** Test Cases *** | |||
Learn | |||
Learn Test | |||
Relearn | |||
Relearn Test | |||
Empty Part | |||
Empty Part Test |
@@ -1,18 +0,0 @@ | |||
*** Settings *** | |||
Suite Setup Statistics Setup | |||
Suite Teardown Statistics Teardown | |||
Resource lib.robot | |||
*** Variables *** | |||
${STATS_BACKEND} sqlite3 | |||
${STATS_HASH} hash = "siphash"; | |||
*** Test Cases *** | |||
Learn | |||
Learn Test | |||
Relearn | |||
Relearn Test | |||
Empty Part | |||
Empty Part Test |
@@ -1,18 +0,0 @@ | |||
*** Settings *** | |||
Suite Setup Statistics Setup | |||
Suite Teardown Statistics Teardown | |||
Resource lib.robot | |||
*** Variables *** | |||
${STATS_BACKEND} sqlite3 | |||
${STATS_HASH} hash = "xxhash"; | |||
*** Test Cases *** | |||
Learn | |||
Learn Test | |||
Relearn | |||
Relearn Test | |||
Empty Part | |||
Empty Part Test |
@@ -13,6 +13,7 @@ ${FLAG2_NUMBER} 51 | |||
${FLAG2_SYMBOL} R_TEST_FUZZY_WHITE | |||
@{MESSAGES} ${TESTDIR}/messages/spam_message.eml ${TESTDIR}/messages/zip.eml | |||
@{RANDOM_MESSAGES} ${TESTDIR}/messages/bad_message.eml ${TESTDIR}/messages/zip-doublebad.eml | |||
${REDIS_SCOPE} Suite | |||
${RSPAMD_SCOPE} Suite | |||
${SETTINGS_FUZZY_WORKER} ${EMPTY} | |||
${SETTINGS_FUZZY_CHECK} ${EMPTY} | |||
@@ -92,12 +93,13 @@ Fuzzy Setup Keyed | |||
Fuzzy Setup Generic | |||
[Arguments] ${algorithm} ${worker_settings} ${check_settings} &{kwargs} | |||
${has_TMPDIR} = Evaluate 'TMPDIR' in $kwargs | |||
${worker_settings} = Set Variable backend \= "redis"; ${worker_settings} | |||
${tmpdir} = Make Temporary Directory | |||
Set Suite Variable ${TMPDIR} ${tmpdir} | |||
Set Suite Variable ${SETTINGS_FUZZY_WORKER} ${worker_settings} | |||
Set Suite Variable ${SETTINGS_FUZZY_CHECK} ${check_settings} | |||
Set Suite Variable ${ALGORITHM} ${algorithm} | |||
Run Keyword If '${has_TMPDIR}' == 'True' Generic Setup TMPDIR=&{kwargs}[TMPDIR] | |||
... ELSE Generic Setup | |||
Run Redis | |||
Generic Setup TMPDIR=${TMPDIR} | |||
Fuzzy Setup Plain Fasthash | |||
Fuzzy Setup Plain fasthash | |||
@@ -147,8 +149,5 @@ Fuzzy Multimessage Overwrite Test | |||
\ Fuzzy Overwrite Test ${i} | |||
Fuzzy Teardown | |||
${port_normal} = Create List ${SOCK_STREAM} ${LOCAL_ADDR} ${PORT_NORMAL} | |||
${port_fuzzy} = Create List ${SOCK_DGRAM} ${LOCAL_ADDR} ${PORT_FUZZY} | |||
${port_controller} = Create List ${SOCK_STREAM} ${LOCAL_ADDR} ${PORT_CONTROLLER} | |||
${ports} = Create List ${port_normal} ${port_fuzzy} ${port_controller} | |||
Generic Teardown @{ports} | |||
Normal Teardown | |||
Shutdown Process With Children ${REDIS_PID} |
@@ -1,31 +0,0 @@ | |||
*** Settings *** | |||
Suite Setup Fuzzy Redis General Setup | |||
Suite Teardown Fuzzy Redis General Teardown | |||
Resource lib.robot | |||
*** Variables *** | |||
${REDIS_SCOPE} Suite | |||
*** Test Cases *** | |||
Fuzzy Add | |||
Fuzzy Multimessage Add Test | |||
Fuzzy Fuzzy | |||
Fuzzy Multimessage Fuzzy Test | |||
Fuzzy Delete | |||
Fuzzy Multimessage Delete Test | |||
Fuzzy Overwrite | |||
Fuzzy Multimessage Overwrite Test | |||
*** Keywords *** | |||
Fuzzy Redis General Setup | |||
${tmpdir} = Make Temporary Directory | |||
Set Suite Variable ${TMPDIR} ${tmpdir} | |||
Run Redis | |||
Fuzzy Setup Generic siphash backend \= "redis"; ${EMPTY} TMPDIR=${TMPDIR} | |||
Fuzzy Redis General Teardown | |||
Normal Teardown | |||
Shutdown Process With Children ${REDIS_PID} |
@@ -53,20 +53,17 @@ classifier { | |||
statfile { | |||
spam = true; | |||
symbol = BAYES_SPAM; | |||
${STATS_PATH_SPAM} | |||
size = 1M; | |||
${REDIS_SERVER} | |||
} | |||
statfile { | |||
spam = false; | |||
symbol = BAYES_HAM; | |||
${STATS_PATH_HAM} | |||
size = 1M; | |||
${REDIS_SERVER} | |||
} | |||
cache { | |||
${STATS_PATH_CACHE} | |||
${REDIS_SERVER} | |||
} | |||
} |
@@ -159,4 +159,4 @@ Sync Fuzzy Storage | |||
Log ${result.stdout} | |||
Run Keyword If $len == 0 Follow Rspamd Log | |||
... ELSE Custom Follow Rspamd Log @{vargs}[0]/rspamd.log @{vargs}[1] @{vargs}[2] @{vargs}[3] | |||
Sleep 0.005s Try give fuzzy storage time to sync | |||
Sleep 0.1s Try give fuzzy storage time to sync |