commit 704c110: [Test] Fuzzy skip hashes
korgoth1
vladislav.stakhov at gmail.com
Sun Feb 9 21:07:10 UTC 2020
Author: korgoth1
Date: 2020-02-09 22:08:55 +0300
URL: https://github.com/rspamd/rspamd/commit/704c110e6978acb84b563bdbee4d390aef938f8f
[Test] Fuzzy skip hashes
---
test/functional/cases/120_fuzzy/lib.robot | 8 +++++++-
test/functional/configs/fuzzy.conf | 2 +-
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} {
More information about the Commits
mailing list