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/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/101_lua.robot')
-rw-r--r-- | test/functional/cases/101_lua.robot | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/functional/cases/101_lua.robot b/test/functional/cases/101_lua.robot new file mode 100644 index 0000000..c820d1b --- /dev/null +++ b/test/functional/cases/101_lua.robot @@ -0,0 +1,35 @@ +*** Settings *** +Test Teardown Rspamd Teardown +Library ${RSPAMD_TESTDIR}/lib/rspamd.py +Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot +Variables ${RSPAMD_TESTDIR}/lib/vars.py + +*** Variables *** +${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf +${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml +${RSPAMD_SCOPE} Test +${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat + +*** Test Cases *** +Flags + [Setup] Lua Setup ${RSPAMD_TESTDIR}/lua/flags.lua + Scan File ${MESSAGE} + ${result} = Run Rspamc -h ${RSPAMD_LOCAL_ADDR}:${RSPAMD_PORT_CONTROLLER} stat + Should Contain ${result.stdout} Messages scanned: 0 + +Dependencies + [Setup] Lua Setup ${RSPAMD_TESTDIR}/lua/deps.lua + Scan File ${MESSAGE} + Expect Symbol DEP10 + +Pre and Post Filters + [Setup] Lua Setup ${RSPAMD_TESTDIR}/lua/prepostfilters.lua + Scan File ${MESSAGE} + Expect Symbol TEST_PRE + Expect Symbol TEST_POST + +*** Keywords *** +Lua Setup + [Arguments] ${RSPAMD_LUA_SCRIPT} + Set Test Variable ${RSPAMD_LUA_SCRIPT} + Rspamd Setup |