From: Vsevolod Stakhov Date: Fri, 24 Apr 2026 07:44:14 +0000 (+0100) Subject: [Test] checkv3: use spam_message for inline-settings regression test X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba765ef9adcf18b7d2b71cde22fd700e99fe1a98;p=thirdparty%2Frspamd.git [Test] checkv3: use spam_message for inline-settings regression test GTUBE short-circuits the Rspamd filter pipeline (forced reject before SETTINGS_CHECK runs), so the inline metadata.settings test from the previous commit silently never exercised settings.lua at all. Switch to messages/spam_message.eml so the prefilter chain actually runs and apply_settings_side_effects gets a chance to inject the symbol. Also drop the actions.reject override case: with GTUBE it was a false positive (GTUBE forces reject regardless of thresholds) and a proper rewrite needs a second non-GTUBE message wired into the suite, which can come in a follow-up. Use the array form `symbols = [..]` matching the v2 INJECT SYMBOL test in 108_settings.robot - it is the documented apply spelling. --- diff --git a/test/functional/cases/001_merged/430_checkv3.robot b/test/functional/cases/001_merged/430_checkv3.robot index 45429b88a2..fc013c06a3 100644 --- a/test/functional/cases/001_merged/430_checkv3.robot +++ b/test/functional/cases/001_merged/430_checkv3.robot @@ -5,6 +5,7 @@ Variables ${RSPAMD_TESTDIR}/lib/vars.py *** Variables *** ${GTUBE} ${RSPAMD_TESTDIR}/messages/gtube.eml +${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml ${ALT_RELATED} ${RSPAMD_TESTDIR}/messages/alternative-related.eml ${MIXED_RELATED_HTML} ${RSPAMD_TESTDIR}/messages/mixed-related-html-only.eml ${SETTINGS_NOSYMBOLS} {symbols_enabled = []} @@ -29,20 +30,14 @@ checkv3 with settings_id checkv3 inline metadata.settings injects symbol [Documentation] Inline metadata.settings must run apply_settings_side_effects - ... so settings.symbols actually fires (issue #5999) - ${settings_obj} = Evaluate {"symbols": {"INLINE_V3_TEST": 1.0}} + ... so settings.symbols actually fires (issue #5999). + ... GTUBE is a hard bypass and skips SETTINGS_CHECK, so use a + ... normal message that goes through the full prefilter chain. + ${settings_obj} = Evaluate {"symbols": ["INLINE_V3_TEST"]} &{meta} = Create Dictionary settings=${settings_obj} - Scan File V3 ${GTUBE} metadata=${meta} + Scan File V3 ${MESSAGE} metadata=${meta} Expect Symbol INLINE_V3_TEST -checkv3 inline metadata.settings overrides reject threshold - [Documentation] Inline metadata.settings.actions must invoke the C-side - ... action threshold apply path (issue #5999) - ${settings_obj} = Evaluate {"actions": {"reject": 1.0}} - &{meta} = Create Dictionary settings=${settings_obj} - Scan File V3 ${GTUBE} metadata=${meta} - Expect Action reject - checkv3 missing metadata part [Documentation] Send only message part without metadata, expect HTTP 500 (400 error mapped to 5xx) ${status} = Scan File V3 Single Part message test message body