aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional/cases/101_lua.robot
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2021-05-04 21:43:55 +0200
committerAndrew Lewis <nerf@judo.za.org>2021-05-04 21:52:33 +0200
commita84cecac6bef1211cf8ab245d997b6ac64b6686a (patch)
tree6df6518a5cc60411967a513fa8e5bc418316a1d5 /test/functional/cases/101_lua.robot
parentdb4da2c22d159d1a6450b9447ad90e1795e5c535 (diff)
downloadrspamd-a84cecac6bef1211cf8ab245d997b6ac64b6686a.tar.gz
rspamd-a84cecac6bef1211cf8ab245d997b6ac64b6686a.zip
[Test] Use automatically exported variables
Diffstat (limited to 'test/functional/cases/101_lua.robot')
-rw-r--r--test/functional/cases/101_lua.robot58
1 files changed, 29 insertions, 29 deletions
diff --git a/test/functional/cases/101_lua.robot b/test/functional/cases/101_lua.robot
index 034ce756f..168f0e8bb 100644
--- a/test/functional/cases/101_lua.robot
+++ b/test/functional/cases/101_lua.robot
@@ -1,53 +1,53 @@
*** Settings ***
Test Teardown Normal Teardown
-Library ${TESTDIR}/lib/rspamd.py
-Resource ${TESTDIR}/lib/rspamd.robot
-Variables ${TESTDIR}/lib/vars.py
+Library ${RSPAMD_TESTDIR}/lib/rspamd.py
+Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
+Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${TESTDIR}/configs/lua_test.conf
-${MAP_MAP} ${TESTDIR}/configs/maps/map.list
-${MESSAGE} ${TESTDIR}/messages/spam_message.eml
-${RADIX_MAP} ${TESTDIR}/configs/maps/ip2.list
-${REGEXP_MAP} ${TESTDIR}/configs/maps/regexp.list
+${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
+${MAP_MAP} ${RSPAMD_TESTDIR}/configs/maps/map.list
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${RADIX_MAP} ${RSPAMD_TESTDIR}/configs/maps/ip2.list
+${REGEXP_MAP} ${RSPAMD_TESTDIR}/configs/maps/regexp.list
${RSPAMD_SCOPE} Test
-${URL_TLD} ${TESTDIR}/../lua/unit/test_tld.dat
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
Flags
- [Setup] Lua Setup ${TESTDIR}/lua/flags.lua
+ [Setup] Lua Setup ${RSPAMD_TESTDIR}/lua/flags.lua
Scan File ${MESSAGE}
- ${result} = Run Rspamc -h ${LOCAL_ADDR}:${PORT_CONTROLLER} stat
+ ${result} = Run Rspamc -h ${RSPAMD_LOCAL_ADDR}:${RSPAMD_PORT_CONTROLLER} stat
Should Contain ${result.stdout} Messages scanned: 0
Dependencies
- [Setup] Lua Setup ${TESTDIR}/lua/deps.lua
+ [Setup] Lua Setup ${RSPAMD_TESTDIR}/lua/deps.lua
Scan File ${MESSAGE}
Expect Symbol DEP10
Pre and Post Filters
- [Setup] Lua Setup ${TESTDIR}/lua/prepostfilters.lua
+ [Setup] Lua Setup ${RSPAMD_TESTDIR}/lua/prepostfilters.lua
Scan File ${MESSAGE}
Expect Symbol TEST_PRE
Expect Symbol TEST_POST
Recipient Parsing Sanity
- [Setup] Lua Setup ${TESTDIR}/lua/recipients.lua
+ [Setup] Lua Setup ${RSPAMD_TESTDIR}/lua/recipients.lua
Scan File ${MESSAGE} Rcpt=rcpt1@foobar,rcpt2@foobar,rcpt3@foobar,rcpt4@foobar
Expect Symbol With Exact Options TEST_RCPT rcpt1@foobar,rcpt2@foobar,rcpt3@foobar,rcpt4@foobar
TLD parts
- [Setup] TLD Setup ${TESTDIR}/lua/tlds.lua
+ [Setup] TLD Setup ${RSPAMD_TESTDIR}/lua/tlds.lua
Scan File ${MESSAGE}
Expect Symbol With Exact Options TEST_TLD no worry
Hashes
- [Setup] Lua Setup ${TESTDIR}/lua/hashes.lua
+ [Setup] Lua Setup ${RSPAMD_TESTDIR}/lua/hashes.lua
Scan File ${MESSAGE}
Expect Symbol With Exact Options TEST_HASHES no worry
Maps Key Values
- [Setup] Lua Replace Setup ${TESTDIR}/lua/maps_kv.lua
+ [Setup] Lua Replace Setup ${RSPAMD_TESTDIR}/lua/maps_kv.lua
[Teardown] Lua Replace Teardown
Scan File ${MESSAGE}
Expect Symbol With Exact Options RADIX_KV no worry
@@ -55,14 +55,14 @@ Maps Key Values
Expect Symbol With Exact Options MAP_KV no worry
Option Order
- [Setup] Lua Replace Setup ${TESTDIR}/lua/option_order.lua
+ [Setup] Lua Replace Setup ${RSPAMD_TESTDIR}/lua/option_order.lua
[Teardown] Lua Replace Teardown
Scan File ${MESSAGE}
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
Rule conditions
- [Setup] Lua Replace Setup ${TESTDIR}/lua/conditions.lua
+ [Setup] Lua Replace Setup ${RSPAMD_TESTDIR}/lua/conditions.lua
[Teardown] Lua Replace Teardown
Scan File ${MESSAGE}
Expect Symbol With Option ANY_A hello3
@@ -71,23 +71,23 @@ Rule conditions
*** Keywords ***
Lua Setup
- [Arguments] ${LUA_SCRIPT}
- Set Test Variable ${LUA_SCRIPT}
- New Setup LUA_SCRIPT=${LUA_SCRIPT} URL_TLD=${URL_TLD}
+ [Arguments] ${RSPAMD_LUA_SCRIPT}
+ Set Test Variable ${RSPAMD_LUA_SCRIPT}
+ New Setup
Lua Replace Setup
[Arguments] ${LUA_SCRIPT_UNESC}
- ${LUA_SCRIPT} = Make Temporary File
+ ${RSPAMD_LUA_SCRIPT} = Make Temporary File
${lua} = Get File ${LUA_SCRIPT_UNESC}
${lua} = Replace Variables ${lua}
- Create File ${LUA_SCRIPT} ${lua}
- Lua Setup ${LUA_SCRIPT}
+ Create File ${RSPAMD_LUA_SCRIPT} ${lua}
+ Lua Setup ${RSPAMD_LUA_SCRIPT}
Lua Replace Teardown
- Remove File ${LUA_SCRIPT}
+ Remove File ${RSPAMD_LUA_SCRIPT}
Normal Teardown
TLD Setup
- [Arguments] ${LUA_SCRIPT}
- Set Test Variable ${URL_TLD} ${TESTDIR}/../../contrib/publicsuffix/effective_tld_names.dat
- Lua Setup ${LUA_SCRIPT}
+ [Arguments] ${RSPAMD_LUA_SCRIPT}
+ Set Test Variable ${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../../contrib/publicsuffix/effective_tld_names.dat
+ Lua Setup ${RSPAMD_LUA_SCRIPT}