Debian Codegraph @

test/functional/cases/101_lua.robot

raw
1 *** Settings ***
2 Test Teardown Rspamd Teardown
3 Library ${RSPAMD_TESTDIR}/lib/rspamd.py
4 Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
5 Variables ${RSPAMD_TESTDIR}/lib/vars.py
6
7 *** Variables ***
8 ${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
9 ${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
10 ${RSPAMD_SCOPE} Test
11 ${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
12
13 *** Test Cases ***
14 Flags
15 [Setup] Lua Setup ${RSPAMD_TESTDIR}/lua/flags.lua
16 Scan File ${MESSAGE}
17 ${result} = Run Rspamc -h ${RSPAMD_LOCAL_ADDR}:${RSPAMD_PORT_CONTROLLER} stat
18 Should Contain ${result.stdout} Messages scanned: 0
19
20 Dependencies
21 [Setup] Lua Setup ${RSPAMD_TESTDIR}/lua/deps.lua
22 Scan File ${MESSAGE}
23 Expect Symbol DEP10
24
25 Pre and Post Filters
26 [Setup] Lua Setup ${RSPAMD_TESTDIR}/lua/prepostfilters.lua
27 Scan File ${MESSAGE}
28 Expect Symbol TEST_PRE
29 Expect Symbol TEST_POST
30
31 *** Keywords ***
32 Lua Setup
33 [Arguments] ${RSPAMD_LUA_SCRIPT}
34 Set Test Variable ${RSPAMD_LUA_SCRIPT}
35 Rspamd Setup