]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Use FUZZY_INCLUDE for HTML fuzzy test configuration
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 4 Oct 2025 20:35:19 +0000 (21:35 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 4 Oct 2025 20:35:19 +0000 (21:35 +0100)
Create fuzzy-html.conf with HTML-specific settings and use
RSPAMD_FUZZY_INCLUDE variable to include it in the fuzzy rule.
This is the correct way to add per-test rule settings.

test/functional/cases/120_fuzzy/html-fuzzy.robot
test/functional/configs/fuzzy-html.conf [new file with mode: 0644]

index 26be91392a4c0befb36ced0efc8e290338763fac..b27e9bd8c8e735a7e9a5eb573777bf277961e08b 100644 (file)
@@ -12,8 +12,8 @@ ${HTML_PHISHING}           ${RSPAMD_TESTDIR}/messages/html_phishing.eml
 HTML Fuzzy Setup Mumhash
   Set Suite Variable  ${RSPAMD_FUZZY_ALGORITHM}  mumhash
   Set Suite Variable  ${RSPAMD_FUZZY_SERVER_MODE}  servers
-  # Use standard test flags and add HTML-specific settings
-  Set Suite Variable  ${SETTINGS_FUZZY_CHECK}  servers = "${RSPAMD_LOCAL_ADDR}:${RSPAMD_PORT_FUZZY}"; html_shingles = true; min_html_tags = 5; html_weight = 1.0;
+  # Include HTML-specific settings via FUZZY_INCLUDE
+  Set Suite Variable  ${RSPAMD_FUZZY_INCLUDE}  ${RSPAMD_TESTDIR}/configs/fuzzy-html.conf
   Rspamd Redis Setup
 
 HTML Fuzzy Add Test
diff --git a/test/functional/configs/fuzzy-html.conf b/test/functional/configs/fuzzy-html.conf
new file mode 100644 (file)
index 0000000..8ad1849
--- /dev/null
@@ -0,0 +1,4 @@
+# HTML fuzzy hashing settings for tests
+html_shingles = true;
+min_html_tags = 5;
+html_weight = 1.0;