aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorkorgoth1 <vladislav.stakhov@gmail.com>2020-02-09 22:08:55 +0300
committerkorgoth1 <vladislav.stakhov@gmail.com>2020-02-09 22:08:55 +0300
commit704c110e6978acb84b563bdbee4d390aef938f8f (patch)
tree1fc0885cdedff472227539b924e191b6fcf880be /test
parent71386001dddd8f681da1a5780ad91fa8f190938a (diff)
downloadrspamd-704c110e6978acb84b563bdbee4d390aef938f8f.tar.gz
rspamd-704c110e6978acb84b563bdbee4d390aef938f8f.zip
[Test] Fuzzy skip hashes
Diffstat (limited to 'test')
-rw-r--r--test/functional/cases/120_fuzzy/lib.robot8
-rw-r--r--test/functional/configs/fuzzy.conf2
2 files changed, 8 insertions, 2 deletions
diff --git a/test/functional/cases/120_fuzzy/lib.robot b/test/functional/cases/120_fuzzy/lib.robot
index 3f1fad807..9d17a564f 100644
--- a/test/functional/cases/120_fuzzy/lib.robot
+++ b/test/functional/cases/120_fuzzy/lib.robot
@@ -21,6 +21,7 @@ ${SETTINGS_FUZZY_CHECK} ${EMPTY}
*** Keywords ***
Fuzzy Skip Add Test Base
+ Create File ${TMPDIR}/skip_hash.map
[Arguments] ${message}
Set Suite Variable ${RSPAMD_FUZZY_ADD_${message}} 0
${result} = Run Rspamc -h ${LOCAL_ADDR}:${PORT_CONTROLLER} -w 10 -f
@@ -28,7 +29,12 @@ Fuzzy Skip Add Test Base
Check Rspamc ${result}
Sync Fuzzy Storage
${result} = Scan Message With Rspamc ${message}
- Should Not Contain ${result.stdout} R_TEST_FUZZY_DENIED
+ Create File ${TMPDIR}/test.map
+ Should Contain ${result.stdout} R_TEST_FUZZY_DENIED
+ Append To File ${TMPDIR}/skip_hash.map 670cfcba72a87bab689958a8af5c22593dc17c907836c7c26a74d1bb49add25adfa45a5f172e3af82c9c638e8eb5fc860c22c7e966e61a459165ef0b9e1acc89
+ ${result} = Scan Message With Rspamc ${message}
+ Check Rspamc ${result} R_TEST_FUZZY_DENIED inverse=1
+
Fuzzy Add Test
[Arguments] ${message}
diff --git a/test/functional/configs/fuzzy.conf b/test/functional/configs/fuzzy.conf
index 4a644a8a3..bc4e72e7b 100644
--- a/test/functional/configs/fuzzy.conf
+++ b/test/functional/configs/fuzzy.conf
@@ -72,7 +72,7 @@ fuzzy_check {
mime_types = ["application/*"];
read_only = false;
skip_unknown = true;
- skip_hashes = "${TESTDIR}/configs/maps/skip_hashes.list";
+ skip_hashes = "${TMPDIR}/skip_hash.map";
${SETTINGS_FUZZY_CHECK}
fuzzy_map = {
${FLAG1_SYMBOL} {