]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] url_redirector tests: fix message format and variable syntax
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 3 May 2026 20:31:23 +0000 (21:31 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 3 May 2026 20:31:23 +0000 (21:31 +0100)
- Convert test messages to HTML format for proper URL extraction
- Fix variable syntax error in test suite 164
- Ensure chain redirect tests work correctly in CI environment

test/functional/cases/164_url_redirector_pr6014.robot
test/functional/messages/chain_multipart.eml
test/functional/messages/chain_redirect.eml

index 4b1b8219e226ffa626d1f1c166af4b283e13ce1e..be5ca5fd6269d56170993d44fff053426b47c2cf 100644 (file)
@@ -14,8 +14,7 @@ ${MULTIPART_MESSAGE}    ${RSPAMD_TESTDIR}/messages/chain_multipart.eml
 ${REDIS_SCOPE}          Suite
 ${RSPAMD_SCOPE}         Suite
 ${RSPAMD_URL_TLD}       ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
-${SETTINGS}             {symbols_enabled=[URL_REDIRECTOR_CHECK]}
-${SETTINGS_WITH_SYMBOL} {symbols_enabled=[URL_REDIRECTOR_CHECK,URL_REDIRECTOR]}
+${SETTINGS}    {symbols_enabled=[URL_REDIRECTOR_CHECK]}
 
 *** Test Cases ***
 CHAIN REDIRECT RESOLUTION WITH INTERMEDIATE HOPS
index 1600170f6223de2e34e6dbfacebc8d726464da32..e93285ec4b9de1b9baa7459edfa24c2760e9d2b8 100644 (file)
@@ -1,7 +1,11 @@
 MIME-Version: 1.0
-Content-Type: text/plain; charset="utf-8"
+Content-Type: text/html; charset="utf-8"
 Content-Transfer-Encoding: quoted-printable
 
-Test message with redirect chain
-http://127.0.0.1:18080/chain1
-http://127.0.0.1:18080/redirect2
+<html>
+<body>
+<p>Test message with redirect chains</p>
+<a href="http://127.0.0.1:18080/chain1">Chain 1</a>
+<a href="http://127.0.0.1:18080/redirect2">Redirect 2</a>
+</body>
+</html>
index 6bbcd6748f3ccf8bfe94c98bf3038ed7dfd84caf..2c30f0fb250dae4ed00cb90808a4674926a4b742 100644 (file)
@@ -1,3 +1,9 @@
-Content-type: text/plain
+MIME-Version: 1.0
+Content-Type: text/html; charset="utf-8"
+Content-Transfer-Encoding: quoted-printable
 
-Test chain redirect http://127.0.0.1:18080/chain1
+<html>
+<body>
+<a href="http://127.0.0.1:18080/chain1">chain link</a>
+</body>
+</html>