diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 21:30:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 21:30:40 +0000 |
commit | 133a45c109da5310add55824db21af5239951f93 (patch) | |
tree | ba6ac4c0a950a0dda56451944315d66409923918 /test/functional/cases/001_merged/101_lua.robot | |
parent | Initial commit. (diff) | |
download | rspamd-133a45c109da5310add55824db21af5239951f93.tar.xz rspamd-133a45c109da5310add55824db21af5239951f93.zip |
Adding upstream version 3.8.1.upstream/3.8.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/functional/cases/001_merged/101_lua.robot')
-rw-r--r-- | test/functional/cases/001_merged/101_lua.robot | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/test/functional/cases/001_merged/101_lua.robot b/test/functional/cases/001_merged/101_lua.robot new file mode 100644 index 0000000..d1a771c --- /dev/null +++ b/test/functional/cases/001_merged/101_lua.robot @@ -0,0 +1,50 @@ +*** Settings *** +Library ${RSPAMD_TESTDIR}/lib/rspamd.py +Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot +Variables ${RSPAMD_TESTDIR}/lib/vars.py + +*** Variables *** +${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml +${RSPAMD_MAP_MAP} ${RSPAMD_TESTDIR}/configs/maps/map.list +${RSPAMD_RADIX_MAP} ${RSPAMD_TESTDIR}/configs/maps/ip2.list +${RSPAMD_REGEXP_MAP} ${RSPAMD_TESTDIR}/configs/maps/regexp.list + +*** Test Cases *** +Recipient Parsing Sanity + Scan File ${MESSAGE} Rcpt=rcpt1@foobar,rcpt2@foobar,rcpt3@foobar,rcpt4@foobar + ... Settings={symbols_enabled = [TEST_RCPT]} + Expect Symbol With Exact Options TEST_RCPT rcpt1@foobar,rcpt2@foobar,rcpt3@foobar,rcpt4@foobar + +TLD parts + Scan File ${MESSAGE} Settings={symbols_enabled = [TEST_TLD]} + Expect Symbol With Exact Options TEST_TLD no worry + +Hashes + Scan File ${MESSAGE} Settings={symbols_enabled = [TEST_HASHES]} + Expect Symbol With Exact Options TEST_HASHES no worry + +Maps Key Values + Scan File ${MESSAGE} Settings={symbols_enabled = [RADIX_KV, REGEXP_KV, MAP_KV]} + Expect Symbol With Exact Options RADIX_KV no worry + Expect Symbol With Exact Options REGEXP_KV no worry + Expect Symbol With Exact Options MAP_KV no worry + +Option Order + Scan File ${MESSAGE} Settings={symbols_enabled = [OPTION_ORDER, TBL_OPTION_ORDER]} + Expect Symbol With Exact Options OPTION_ORDER one two three 4 5 a + Expect Symbol With Exact Options TBL_OPTION_ORDER one two three 4 5 a + +Remove Result + Scan File ${MESSAGE} Settings={symbols_enabled = [REMOVE_RESULT_EXPECTED, REMOVE_RESULT_UNEXPECTED]} + Expect Symbol REMOVE_RESULT_EXPECTED + Do Not Expect Symbol REMOVE_RESULT_UNEXPECTED + +Rule conditions + Scan File ${MESSAGE} Settings={symbols_enabled = [ANY_A]} + Expect Symbol With Option ANY_A hello3 + Expect Symbol With Option ANY_A hello1 + Expect Symbol With Option ANY_A hello2 + +External Maps Simple + Scan File ${MESSAGE} Settings={symbols_enabled = [EXTERNAL_MAP]} + Expect Symbol With Exact Options EXTERNAL_MAP +hello map
\ No newline at end of file |