*** Settings ***
-Suite Setup New Setup
-Suite Teardown Simple Teardown
+Suite Setup Rspamd Setup
+Suite 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/trivial.conf
-${GTUBE} ${RSPAMD_TESTDIR}/messages/gtube.eml
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/trivial.conf
+${GTUBE} ${RSPAMD_TESTDIR}/messages/gtube.eml
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
GTUBE
*** Settings ***
-Test Teardown Normal Teardown
+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
-${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
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${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
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
Flags
Lua Setup
[Arguments] ${RSPAMD_LUA_SCRIPT}
Set Test Variable ${RSPAMD_LUA_SCRIPT}
- New Setup
+ Rspamd Setup
Lua Replace Setup
[Arguments] ${LUA_SCRIPT_UNESC}
Lua Replace Teardown
Remove File ${RSPAMD_LUA_SCRIPT}
- Normal Teardown
+ Rspamd Teardown
TLD Setup
[Arguments] ${RSPAMD_LUA_SCRIPT}
*** Settings ***
-Suite Setup Multimap Setup
-Suite Teardown Multimap Teardown
+Suite Setup Rspamd Redis Setup
+Suite Teardown Rspamd Redis Teardown
Library ${RSPAMD_TESTDIR}/lib/rspamd.py
Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${RSPAMD_TESTDIR}/configs/multimap.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
-${UTF_MESSAGE} ${RSPAMD_TESTDIR}/messages/utf.eml
-${REDIS_SCOPE} Suite
-${RSPAMD_SCOPE} Suite
-${RCVD1} ${RSPAMD_TESTDIR}/messages/received1.eml
-${RCVD2} ${RSPAMD_TESTDIR}/messages/received2.eml
-${RCVD3} ${RSPAMD_TESTDIR}/messages/received3.eml
-${RCVD4} ${RSPAMD_TESTDIR}/messages/received4.eml
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
-${URL1} ${RSPAMD_TESTDIR}/messages/url1.eml
-${URL2} ${RSPAMD_TESTDIR}/messages/url2.eml
-${URL3} ${RSPAMD_TESTDIR}/messages/url3.eml
-${URL4} ${RSPAMD_TESTDIR}/messages/url4.eml
-${URL5} ${RSPAMD_TESTDIR}/messages/url5.eml
-${FREEMAIL_CC} ${RSPAMD_TESTDIR}/messages/freemailcc.eml
-${URL_ICS} ${RSPAMD_TESTDIR}/messages/ics.eml
+${CONFIG} ${RSPAMD_TESTDIR}/configs/multimap.conf
+${FREEMAIL_CC} ${RSPAMD_TESTDIR}/messages/freemailcc.eml
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${RCVD1} ${RSPAMD_TESTDIR}/messages/received1.eml
+${RCVD2} ${RSPAMD_TESTDIR}/messages/received2.eml
+${RCVD3} ${RSPAMD_TESTDIR}/messages/received3.eml
+${RCVD4} ${RSPAMD_TESTDIR}/messages/received4.eml
+${REDIS_SCOPE} Suite
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${URL1} ${RSPAMD_TESTDIR}/messages/url1.eml
+${URL2} ${RSPAMD_TESTDIR}/messages/url2.eml
+${URL3} ${RSPAMD_TESTDIR}/messages/url3.eml
+${URL4} ${RSPAMD_TESTDIR}/messages/url4.eml
+${URL5} ${RSPAMD_TESTDIR}/messages/url5.eml
+${URL_ICS} ${RSPAMD_TESTDIR}/messages/ics.eml
+${UTF_MESSAGE} ${RSPAMD_TESTDIR}/messages/utf.eml
*** Test Cases ***
URL_ICS
MAP - MULTISYMBOL DISABLED
Scan File ${MESSAGE} Rcpt=user3@example.com
Expect Symbol With Exact Options RCPT_MAP_NOMULTISYM user3@example.com SYM1
-
-*** Keywords ***
-Multimap Setup
- Run Redis
- New Setup
-
-Multimap Teardown
- Normal Teardown
- Shutdown Process With Children ${REDIS_PID}
*** Settings ***
-Test Teardown Normal Teardown
+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/password.conf
-${CONTROLLER_ERRORS} False
-${RSPAMD_SCOPE} Test
-${RSPAMD_PBKDF_PASSWORD} "$1$rhzzahtm8a5homdhh7z4qiiy7j8pzp4u$k5toro136brshjjuy9t39r785td69qodmd39qzygxuyehn9tqauy"
+${CONFIG} ${RSPAMD_TESTDIR}/configs/password.conf
+${CONTROLLER_ERRORS} False
${RSPAMD_CATENA_PASSWORD} "$2$xu1581gidj5cyp4yjgo68qbj6jz1j8o3$j9yg4k58jy3fj8suijxx9d7pea6a6obtufq9kfenosyq8erm87ky"
+${RSPAMD_PBKDF_PASSWORD} "$1$rhzzahtm8a5homdhh7z4qiiy7j8pzp4u$k5toro136brshjjuy9t39r785td69qodmd39qzygxuyehn9tqauy"
+${RSPAMD_SCOPE} Test
*** Test Cases ***
PASSWORD - PBKDF
[Arguments] ${RSPAMD_PASSWORD} ${RSPAMD_ENABLE_PASSWORD}=nq2
Set Test Variable ${RSPAMD_PASSWORD}
Set Test Variable ${RSPAMD_ENABLE_PASSWORD}
- New Setup
+ Rspamd Setup
*** Settings ***
-Suite Setup GetFrom Setup
-Suite Teardown Simple Teardown
+Suite Setup Rspamd Setup
+Suite 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_script.conf
-${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/get_from.lua
-${RSPAMD_SCOPE} Suite
-
-${SYMBOL} GET_FROM
-${OPTIONS1} ,user@example.org,user,example.org
-${OPTIONS2} First Last,user@example.org,user,example.org
-${OPTIONS3} First M. Last,user@example.org,user,example.org
+${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_script.conf
+${OPTIONS1} ,user@example.org,user,example.org
+${OPTIONS2} First Last,user@example.org,user,example.org
+${OPTIONS3} First M. Last,user@example.org,user,example.org
+${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/get_from.lua
+${RSPAMD_SCOPE} Suite
+${SYMBOL} GET_FROM
*** Test Cases ***
task:get_from('mime') - address only
task:get_from('mime') - quoted in the middle of DN (inner spaces)
Scan File ${RSPAMD_TESTDIR}/messages/from/from_quoted_dn_middle_inner.eml
Expect Symbol With Exact Options ${SYMBOL} ${OPTIONS3}
-
-*** Keywords ***
-GetFrom Setup
- New Setup
*** Settings ***
-Suite Setup MIMETypes Setup
-Suite Teardown Simple Teardown
+Suite Setup Rspamd Setup
+Suite 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/mime_types.conf
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/mime_types.conf
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
Zip
Empty text part should not be treat as html
Scan File ${RSPAMD_TESTDIR}/messages/empty-plain-text.eml
Do Not Expect Symbol FORGED_OUTLOOK_HTML
-
-*** Keywords ***
-MIMETypes Setup
- New Setup
*** Settings ***
-Suite Setup New Setup
-Suite Teardown Normal Teardown
+Suite Setup Rspamd Setup
+Suite 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/mid.conf
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/mid.conf
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
MID - invalid Message-ID
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${RSPAMD_TESTDIR}/configs/settings.conf
-${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/settings.lua
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
-${MESSAGE_PRIORITY} ${RSPAMD_TESTDIR}/messages/priority.eml
-${MESSAGE_7BIT} ${RSPAMD_TESTDIR}/messages/utf.eml
-${MESSAGE_CUSTOM_HDR} ${RSPAMD_TESTDIR}/messages/empty-plain-text.eml
-${MESSAGE_ABSENT_MIME} ${RSPAMD_TESTDIR}/messages/ed25519.eml
-${SPAM_MESSAGE} ${RSPAMD_TESTDIR}/messages/spam.eml
-${HAM_MESSAGE} ${RSPAMD_TESTDIR}/messages/ham.eml
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/settings.conf
+${HAM_MESSAGE} ${RSPAMD_TESTDIR}/messages/ham.eml
+${MESSAGE_7BIT} ${RSPAMD_TESTDIR}/messages/utf.eml
+${MESSAGE_ABSENT_MIME} ${RSPAMD_TESTDIR}/messages/ed25519.eml
+${MESSAGE_CUSTOM_HDR} ${RSPAMD_TESTDIR}/messages/empty-plain-text.eml
+${MESSAGE_PRIORITY} ${RSPAMD_TESTDIR}/messages/priority.eml
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/settings.lua
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${SPAM_MESSAGE} ${RSPAMD_TESTDIR}/messages/spam.eml
*** Keywords ***
Check Everything Disabled
Settings Setup
Copy File ${RSPAMD_TESTDIR}/data/bayes.spam.sqlite3 /tmp/bayes.spam.sqlite3
Copy File ${RSPAMD_TESTDIR}/data/bayes.ham.sqlite3 /tmp/bayes.ham.sqlite3
- New Setup
+ Rspamd Setup
Settings Teardown
- Normal Teardown
+ Rspamd Teardown
Remove Files /tmp/bayes.spam.sqlite3 /tmp/bayes.ham.sqlite3
*** Settings ***
-Suite Setup Composites Setup
-Suite Teardown Simple Teardown
+Suite Setup Rspamd Setup
+Suite 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/composites.conf
-${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/composites.lua
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
-${RSPAMD_SCOPE} Suite
+${CONFIG} ${RSPAMD_TESTDIR}/configs/composites.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/composites.lua
+${RSPAMD_SCOPE} Suite
*** Test Cases ***
Composites - All in One
Expect Symbol With Score SYMOPTS4 6.00
Do Not Expect Symbol SYMOPTS2
Do Not Expect Symbol SYMOPTS1
-
-*** Keywords ***
-Composites Setup
- New Setup
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${RSPAMD_TESTDIR}/configs/stats.conf
-${MESSAGE_SPAM} ${RSPAMD_TESTDIR}/messages/spam_message.eml
-${MESSAGE_HAM} ${RSPAMD_TESTDIR}/messages/ham.eml
-${REDIS_SCOPE} Suite
-${RSPAMD_REDIS_SERVER} null
-${RSPAMD_SCOPE} Suite
+${CONFIG} ${RSPAMD_TESTDIR}/configs/stats.conf
+${MESSAGE_HAM} ${RSPAMD_TESTDIR}/messages/ham.eml
+${MESSAGE_SPAM} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${REDIS_SCOPE} Suite
+${RSPAMD_REDIS_SERVER} null
+${RSPAMD_SCOPE} Suite
${RSPAMD_STATS_BACKEND} redis
-${RSPAMD_STATS_HASH} null
-${RSPAMD_STATS_KEY} null
+${RSPAMD_STATS_HASH} null
+${RSPAMD_STATS_KEY} null
*** Keywords ***
Broken Learn Test
${pass} = Run Keyword And Return Status Expect Symbol BAYES_HAM
Run Keyword If ${pass} Pass Execution What Me Worry
Do Not Expect Symbol BAYES_SPAM
-
-Redis Statistics Setup
- Run Redis
- New Setup
-
-Redis Statistics Teardown
- Normal Teardown
*** Settings ***
-Suite Setup Redis Statistics Setup
-Suite Teardown Redis Statistics Teardown
+Suite Setup Rspamd Redis Setup
+Suite Teardown Rspamd Redis Teardown
Resource lib.robot
*** Variables ***
${RSPAMD_REDIS_SERVER} ${RSPAMD_REDIS_ADDR}:${RSPAMD_REDIS_PORT}
-${RSPAMD_STATS_HASH} siphash
-${RSPAMD_STATS_KEY} ${RSPAMD_KEY_PVT1}
+${RSPAMD_STATS_HASH} siphash
+${RSPAMD_STATS_KEY} ${RSPAMD_KEY_PVT1}
*** Test Cases ***
Learn
*** Settings ***
-Suite Setup Redis Statistics Setup
-Suite Teardown Redis Statistics Teardown
+Suite Setup Rspamd Redis Setup
+Suite Teardown Rspamd Redis Teardown
Resource lib.robot
*** Variables ***
${RSPAMD_REDIS_SERVER} ${RSPAMD_REDIS_ADDR}:${RSPAMD_REDIS_PORT}
-${RSPAMD_STATS_HASH} xxhash
-${RSPAMD_STATS_KEY} ${RSPAMD_KEY_PVT1}
+${RSPAMD_STATS_HASH} xxhash
+${RSPAMD_STATS_KEY} ${RSPAMD_KEY_PVT1}
*** Test Cases ***
Learn
*** Settings ***
-Suite Setup Redis Statistics Setup
-Suite Teardown Redis Statistics Teardown
+Suite Setup Rspamd Redis Setup
+Suite Teardown Rspamd Redis Teardown
Resource lib.robot
*** Variables ***
${RSPAMD_REDIS_SERVER} ${RSPAMD_REDIS_ADDR}:${RSPAMD_REDIS_PORT}
-${RSPAMD_STATS_HASH} siphash
+${RSPAMD_STATS_HASH} siphash
*** Test Cases ***
Learn
*** Settings ***
-Suite Setup Redis Statistics Setup
-Suite Teardown Redis Statistics Teardown
+Suite Setup Rspamd Redis Setup
+Suite Teardown Rspamd Redis Teardown
Resource lib.robot
*** Variables ***
${RSPAMD_REDIS_SERVER} ${RSPAMD_REDIS_ADDR}:${RSPAMD_REDIS_PORT}
-${RSPAMD_STATS_HASH} xxhash
+${RSPAMD_STATS_HASH} xxhash
*** Test Cases ***
Learn
*** Settings ***
-Suite Setup Phishing Setup
-Suite Teardown Simple Teardown
+Suite Setup Rspamd Setup
+Suite 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/phishing.conf
-${MESSAGE1} ${RSPAMD_TESTDIR}/messages/phishing1.eml
-${MESSAGE2} ${RSPAMD_TESTDIR}/messages/phishing2.eml
-${MESSAGE3} ${RSPAMD_TESTDIR}/messages/phishing3.eml
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../../contrib/publicsuffix/effective_tld_names.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/phishing.conf
+${MESSAGE1} ${RSPAMD_TESTDIR}/messages/phishing1.eml
+${MESSAGE2} ${RSPAMD_TESTDIR}/messages/phishing2.eml
+${MESSAGE3} ${RSPAMD_TESTDIR}/messages/phishing3.eml
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../../contrib/publicsuffix/effective_tld_names.dat
*** Test Cases ***
TEST PHISHING
TEST PHISHING STRICT TWO
Scan File ${MESSAGE3}
Expect Symbol STRICTER_PHISHING
-
-*** Keywords ***
-Phishing Setup
- New Setup
*** Settings ***
-Suite Setup DMARC Setup
-Suite Teardown Simple Teardown
+Suite Setup Rspamd Setup
+Suite 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/dmarc.conf
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../../contrib/publicsuffix/effective_tld_names.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/dmarc.conf
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../../contrib/publicsuffix/effective_tld_names.dat
*** Test Cases ***
DMARC NONE PASS DKIM
Scan File ${RSPAMD_TESTDIR}/messages/dmarc/pct_none1.eml
... IP=37.48.67.26 From=foo@mom.za.org
Expect Symbol DMARC_POLICY_SOFTFAIL
-
-*** Keywords ***
-DMARC Setup
- New Setup
*** Settings ***
-Suite Setup DKIM Setup
-Suite Teardown Simple Teardown
+Suite Setup Rspamd Setup
+Suite 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/dkim.conf
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../../contrib/publicsuffix/effective_tld_names.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/dkim.conf
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../../contrib/publicsuffix/effective_tld_names.dat
*** Test Cases ***
DKIM PERMFAIL NXDOMAIN
DKIM Verify ED25519 REJECT
Scan File ${RSPAMD_TESTDIR}/messages/ed25519-broken.eml
Expect Symbol R_DKIM_REJECT
-
-*** Keywords ***
-DKIM Setup
- New Setup
*** Settings ***
-Suite Setup SPF Setup
-Suite Teardown Simple Teardown
+Suite Setup Rspamd Setup
+Suite 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/dmarc.conf
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../../contrib/publicsuffix/effective_tld_names.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/dmarc.conf
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../../contrib/publicsuffix/effective_tld_names.dat
*** Test Cases ***
SPF FAIL UNRESOLVEABLE INCLUDE
Scan File ${RSPAMD_TESTDIR}/messages/dmarc/bad_dkim1.eml
... IP=8.8.8.8 From=x@fail11.org.org.za
Expect Symbol R_SPF_ALLOW
-
-*** Keywords ***
-SPF Setup
- New Setup
*** Settings ***
Suite Setup Fuzzy Setup Encrypted Siphash
-Suite Teardown Fuzzy Teardown
+Suite Teardown Rspamd Redis Teardown
Resource lib.robot
*** Test Cases ***
*** Settings ***
Suite Setup Fuzzy Setup Keyed Fasthash
-Suite Teardown Fuzzy Teardown
+Suite Teardown Rspamd Redis Teardown
Resource lib.robot
*** Test Cases ***
*** Settings ***
Suite Setup Fuzzy Setup Plain Fasthash
-Suite Teardown Fuzzy Teardown
+Suite Teardown Rspamd Redis Teardown
Resource lib.robot
*** Test Cases ***
*** Settings ***
Suite Setup Fuzzy Setup Plain Siphash
-Suite Teardown Fuzzy Teardown
+Suite Teardown Rspamd Redis Teardown
Resource lib.robot
*** Test Cases ***
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${ALGORITHM} ${EMPTY}
-${CONFIG} ${RSPAMD_TESTDIR}/configs/fuzzy.conf
-${RSPAMD_FLAG1_NUMBER} 50
-${FLAG1_SYMBOL} R_TEST_FUZZY_DENIED
-${RSPAMD_FLAG2_NUMBER} 51
-${FLAG2_SYMBOL} R_TEST_FUZZY_WHITE
-${RSPAMD_FUZZY_BACKEND} redis
+${CONFIG} ${RSPAMD_TESTDIR}/configs/fuzzy.conf
+${FLAG1_SYMBOL} R_TEST_FUZZY_DENIED
+${FLAG2_SYMBOL} R_TEST_FUZZY_WHITE
+${REDIS_SCOPE} Suite
+${RSPAMD_FLAG1_NUMBER} 50
+${RSPAMD_FLAG2_NUMBER} 51
+${RSPAMD_FUZZY_BACKEND} redis
${RSPAMD_FUZZY_ENCRYPTED_ONLY} false
${RSPAMD_FUZZY_ENCRYPTION_KEY} null
-${RSPAMD_FUZZY_KEY} null
-${RSPAMD_FUZZY_INCLUDE} ${RSPAMD_TESTDIR}/configs/empty.conf
-${RSPAMD_FUZZY_SHINGLES_KEY} null
-@{MESSAGES} ${RSPAMD_TESTDIR}/messages/spam_message.eml ${RSPAMD_TESTDIR}/messages/zip.eml
-@{MESSAGES_SKIP} ${RSPAMD_TESTDIR}/messages/priority.eml
-@{RANDOM_MESSAGES} ${RSPAMD_TESTDIR}/messages/bad_message.eml ${RSPAMD_TESTDIR}/messages/zip-doublebad.eml
-${REDIS_SCOPE} Suite
-${RSPAMD_SCOPE} Suite
-${SETTINGS_FUZZY_WORKER} ${EMPTY}
-${SETTINGS_FUZZY_CHECK} ${EMPTY}
+${RSPAMD_FUZZY_INCLUDE} ${RSPAMD_TESTDIR}/configs/empty.conf
+${RSPAMD_FUZZY_KEY} null
+${RSPAMD_FUZZY_SHINGLES_KEY} null
+${RSPAMD_SCOPE} Suite
+${SETTINGS_FUZZY_CHECK} ${EMPTY}
+${SETTINGS_FUZZY_WORKER} ${EMPTY}
+@{MESSAGES_SKIP} ${RSPAMD_TESTDIR}/messages/priority.eml
+@{MESSAGES} ${RSPAMD_TESTDIR}/messages/spam_message.eml ${RSPAMD_TESTDIR}/messages/zip.eml
+@{RANDOM_MESSAGES} ${RSPAMD_TESTDIR}/messages/bad_message.eml ${RSPAMD_TESTDIR}/messages/zip-doublebad.eml
*** Keywords ***
Fuzzy Skip Add Test Base
Set Suite Variable ${RSPAMD_FUZZY_ENCRYPTED_ONLY} true
Set Suite Variable ${RSPAMD_FUZZY_ENCRYPTION_KEY} ${RSPAMD_KEY_PUB1}
Set Suite Variable ${RSPAMD_FUZZY_INCLUDE} ${RSPAMD_TESTDIR}/configs/fuzzy-encryption-key.conf
- Fuzzy Setup Generic
+ Rspamd Redis Setup
Fuzzy Setup Encrypted Keyed
[Arguments] ${algorithm}
Set Suite Variable ${RSPAMD_FUZZY_KEY} mYN888sydwLTfE32g2hN
Set Suite Variable ${RSPAMD_FUZZY_SHINGLES_KEY} hXUCgul9yYY3Zlk1QIT2
- Fuzzy Setup Generic
+ Rspamd Redis Setup
Fuzzy Setup Plain
[Arguments] ${algorithm}
Set Suite Variable ${RSPAMD_FUZZY_ALGORITHM} ${algorithm}
- Fuzzy Setup Generic
+ Rspamd Redis Setup
Fuzzy Setup Keyed
[Arguments] ${algorithm}
Set Suite Variable ${RSPAMD_FUZZY_ALGORITHM} ${algorithm}
Set Suite Variable ${RSPAMD_FUZZY_KEY} mYN888sydwLTfE32g2hN
Set Suite Variable ${RSPAMD_FUZZY_SHINGLES_KEY} hXUCgul9yYY3Zlk1QIT2
- Fuzzy Setup Generic
-
-Fuzzy Setup Generic
- Run Redis
- New Setup
+ Rspamd Redis Setup
Fuzzy Setup Plain Fasthash
Fuzzy Setup Plain fasthash
FOR ${i} IN @{MESSAGES}
Fuzzy Overwrite Test ${i}
END
-
-Fuzzy Teardown
- Normal Teardown
- Shutdown Process With Children ${REDIS_PID}
*** Settings ***
Suite Setup Fuzzy Setup Keyed Mumhash
-Suite Teardown Fuzzy Teardown
+Suite Teardown Rspamd Redis Teardown
Resource lib.robot
*** Test Cases ***
*** Settings ***
Suite Setup Fuzzy Setup Plain Mumhash
-Suite Teardown Fuzzy Teardown
+Suite Teardown Rspamd Redis Teardown
Resource lib.robot
*** Test Cases ***
*** Settings ***
Suite Setup Fuzzy Setup Keyed Siphash
-Suite Teardown Fuzzy Teardown
+Suite Teardown Rspamd Redis Teardown
Resource lib.robot
*** Test Cases ***
*** Settings ***
Suite Setup Fuzzy Setup Plain Siphash
-Suite Teardown Fuzzy Teardown
+Suite Teardown Rspamd Redis Teardown
Resource lib.robot
*** Test Cases ***
*** Settings ***
Suite Setup Fuzzy Setup Keyed Xxhash
-Suite Teardown Fuzzy Teardown
+Suite Teardown Rspamd Redis Teardown
Resource lib.robot
*** Test Cases ***
*** Settings ***
Suite Setup Fuzzy Setup Plain Xxhash
-Suite Teardown Fuzzy Teardown
+Suite Teardown Rspamd Redis Teardown
Resource lib.robot
*** Test Cases ***
*** Settings ***
-Suite Setup JSON Setup
-Suite Teardown Simple Teardown
+Suite Setup Rspamd Setup
+Suite Teardown Rspamd Teardown
Library ${RSPAMD_TESTDIR}/lib/rspamd.py
Resource lib.robot
Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
-${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/preresult.lua
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
-${RSPAMD_SCOPE} Suite
+${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/preresult.lua
+${RSPAMD_SCOPE} Suite
*** Test Cases ***
Stat
*** Settings ***
-Suite Setup JSON Setup
-Suite Teardown Simple Teardown
+Suite Setup Rspamd Setup
+Suite Teardown Rspamd Teardown
Library ${RSPAMD_TESTDIR}/lib/rspamd.py
Resource lib.robot
Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
-${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/simple.lua
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
-${RSPAMD_SCOPE} Suite
+${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/simple.lua
+${RSPAMD_SCOPE} Suite
*** Test Cases ***
Stat
${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Keywords ***
-JSON Setup
- New Setup
-
Stat Test
@{result} = HTTP GET ${RSPAMD_LOCAL_ADDR} ${RSPAMD_PORT_CONTROLLER} /stat
Check JSON ${result}[1]
*** Settings ***
-Suite Setup Whitelist Setup
-Suite Teardown Normal Teardown
+Suite Setup Rspamd Setup
+Suite 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/whitelist.conf
-${M_DMARC_OK} ${RSPAMD_TESTDIR}/messages/dmarc/pass_none.eml
-${M_DMARC_BAD} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none.eml
-
-${M_DKIM_RSPAMD_OK} ${RSPAMD_TESTDIR}/messages/dmarc/good_dkim_rspamd.eml
-${M_DKIM_RSPAMD_BAD} ${RSPAMD_TESTDIR}/messages/dmarc/bad_dkim_rspamd.eml
+${CONFIG} ${RSPAMD_TESTDIR}/configs/whitelist.conf
+${M_DKIM_RSPAMD_BAD} ${RSPAMD_TESTDIR}/messages/dmarc/bad_dkim_rspamd.eml
+${M_DKIM_RSPAMD_OK} ${RSPAMD_TESTDIR}/messages/dmarc/good_dkim_rspamd.eml
+${M_DMARC_BAD} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none.eml
+${M_DMARC_OK} ${RSPAMD_TESTDIR}/messages/dmarc/pass_none.eml
${M_NO_DKIM_VALID_SPF} ${RSPAMD_TESTDIR}/messages/dmarc/no_dkim_valid_spf.eml
-
-${UTF_MESSAGE} ${RSPAMD_TESTDIR}/messages/utf.eml
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${UTF_MESSAGE} ${RSPAMD_TESTDIR}/messages/utf.eml
*** Test Cases ***
WHITELISTS
Do Not Expect Symbol R_DKIM_REJECT
Do Not Expect Symbol WHITELIST_SPF_DKIM
Do Not Expect Symbol R_DKIM_ALLOW
-
-*** Keywords ***
-Whitelist Setup
- New Setup
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
+${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
${MAP_WATCH_INTERVAL} 0.5s
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
-${RSPAMD_SCOPE} Suite
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${RSPAMD_SCOPE} Suite
${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
${lua} = Replace Variables ${lua}
Create File ${RSPAMD_LUA_SCRIPT} ${lua}
Create File ${MAP_FILE} ${MAP1}
- New Setup
+ Rspamd Setup
Map Reload Teardown
Remove File ${MAP_FILE}
Remove File ${RSPAMD_LUA_SCRIPT}
- Normal Teardown
+ Rspamd Teardown
*** Settings ***
-Suite Setup New Setup
-Suite Teardown Normal Teardown
+Suite Setup Rspamd Setup
+Suite 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/dkim_signing/simple.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none.eml
-${MESSAGE_FAIL} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none1.eml
-${REDIS_SCOPE} Suite
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/dkim_signing/simple.conf
+${MESSAGE_FAIL} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none1.eml
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none.eml
+${REDIS_SCOPE} Suite
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
TEST SIGNED
*** Settings ***
Suite Setup DKIM Signing Setup
-Suite Teardown Normal Teardown
+Suite Teardown Rspamd Redis Teardown
Library ${RSPAMD_TESTDIR}/lib/rspamd.py
Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${RSPAMD_TESTDIR}/configs/dkim_signing/redis.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none.eml
-${REDIS_SCOPE} Suite
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/dkim_signing/redis.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none.eml
+${REDIS_SCOPE} Suite
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
TEST SIGNED
*** Keywords ***
DKIM Signing Setup
- Run Redis
+ Rspamd Redis Setup
Redis HSET TEST_DKIM_SELECTORS cacophony.za.org dkim
${key} = Get File ${RSPAMD_TESTDIR}/configs/dkim.key
Redis HSET TEST_DKIM_KEYS dkim.cacophony.za.org ${key}
- New Setup
*** Settings ***
-Suite Setup New Setup
-Suite Teardown Normal Teardown
+Suite Setup Rspamd Setup
+Suite 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/dkim_signing/eddsa.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none.eml
-${MESSAGE_FAIL} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none1.eml
-${REDIS_SCOPE} Suite
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/dkim_signing/eddsa.conf
+${MESSAGE_FAIL} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none1.eml
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none.eml
+${REDIS_SCOPE} Suite
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
TEST SIGNED
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${RSPAMD_TESTDIR}/configs/dkim_signing/invalidate.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none.eml
-${REDIS_SCOPE} Suite
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/dkim_signing/invalidate.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none.eml
+${REDIS_SCOPE} Suite
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
TEST SIGNED
${key_dir} Make Temporary Directory
Set Suite Variable ${RSPAMD_KEY_DIR} ${key_dir}
Copy File ${RSPAMD_TESTDIR}/configs/dkim-eddsa.key ${RSPAMD_KEY_DIR}/dkim-eddsa.key
- New Setup
+ Rspamd Setup
Delete Key
Remove File ${RSPAMD_KEY_DIR}/dkim-eddsa.key
Key Invalidation Teardown
Cleanup Temporary Directory ${RSPAMD_KEY_DIR}
- Normal Teardown
+ Rspamd Teardown
*** Settings ***
-Suite Setup New Setup
-Suite Teardown Normal Teardown
+Suite Setup Rspamd Setup
+Suite 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/dkim_signing/multiple.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none.eml
-${MESSAGE_FAIL} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none1.eml
-${REDIS_SCOPE} Suite
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/dkim_signing/multiple.conf
+${MESSAGE_FAIL} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none1.eml
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none.eml
+${REDIS_SCOPE} Suite
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
TEST DOUBLE SIGNED
*** Settings ***
-Suite Setup New Setup
-Suite Teardown Generic Teardown
+Suite Setup Rspamd Setup
+Suite Teardown Rspamd Teardown
Library Process
Library ${RSPAMD_TESTDIR}/lib/rspamd.py
Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${RSPAMD_TESTDIR}/configs/dkim_signing/milter.conf
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/dkim_signing/milter.conf
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
SINGLE SIGNATURE
*** Settings ***
-Suite Setup New Setup
-Suite Teardown Normal Teardown
+Suite Setup Rspamd Setup
+Suite 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/dkim_signing/sign_maps.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none.eml
-${MESSAGE_FAIL} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none1.eml
-${REDIS_SCOPE} Suite
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/dkim_signing/sign_maps.conf
+${MESSAGE_FAIL} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none1.eml
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none.eml
+${REDIS_SCOPE} Suite
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
TEST SIGNED
*** Settings ***
-Suite Setup New Setup
-Suite Teardown Simple Teardown
+Suite Setup Rspamd Setup
+Suite 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/spamassassin.conf
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/spamassassin.conf
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
FREEMAIL
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/simple.lua
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/simple.lua
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
HTTP PROTOCOL
Proxy Setup
# Run slave & copy variables
Set Suite Variable ${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
- New Setup
+ Rspamd Setup
Set Suite Variable ${SLAVE_PID} ${RSPAMD_PID}
Set Suite Variable ${SLAVE_TMPDIR} ${RSPAMD_TMPDIR}
# Run proxy & copy variables
Set Suite Variable ${CONFIG} ${RSPAMD_TESTDIR}/configs/proxy.conf
- New Setup
+ Rspamd Setup
Set Suite Variable ${PROXY_PID} ${RSPAMD_PID}
Set Suite Variable ${PROXY_TMPDIR} ${RSPAMD_TMPDIR}
# Restore variables & run normal teardown
Set Suite Variable ${RSPAMD_PID} ${PROXY_PID}
Set Suite Variable ${RSPAMD_TMPDIR} ${PROXY_TMPDIR}
- Normal Teardown
+ Rspamd Teardown
# Do it again for slave
Set Suite Variable ${RSPAMD_PID} ${SLAVE_PID}
Set Suite Variable ${RSPAMD_TMPDIR} ${SLAVE_TMPDIR}
- Normal Teardown
+ Rspamd Teardown
Suite Teardown Terminate All Processes kill=True
*** Variables ***
-${REDIS_SCOPE} Test
-${CONFIG} ${RSPAMD_TESTDIR}/configs/plugins.conf
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
-${PLUGIN_CONFIG}
+${CONFIG} ${RSPAMD_TESTDIR}/configs/plugins.conf
+${REDIS_SCOPE} Test
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
Tcp client
*** Keywords ***
Rspamadm test Setup
- ${tmpdir} = Make Temporary Directory
- Set Suite Variable ${RSPAMD_TMPDIR} ${tmpdir}
Run Dummy Http
Run Redis
${config} = Replace Variables ${config}
Log ${config}
Create File ${tmpdir}/rspamd.conf ${config}
- [Return] ${tmpdir}
\ No newline at end of file
+ [Return] ${tmpdir}
*** Settings ***
-Suite Setup Antivirus Setup
+Suite Setup Rspamd Redis Setup
Suite Teardown Antivirus Teardown
Library Process
Library ${RSPAMD_TESTDIR}/lib/rspamd.py
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${RSPAMD_TESTDIR}/configs/antivirus.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
-${MESSAGE2} ${RSPAMD_TESTDIR}/messages/freemail.eml
-${REDIS_SCOPE} Suite
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/antivirus.conf
+${MESSAGE2} ${RSPAMD_TESTDIR}/messages/freemail.eml
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${REDIS_SCOPE} Suite
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
CLAMAV MISS
Do Not Expect Symbol AVAST_VIRUS_FAIL
*** Keywords ***
-Antivirus Setup
- New Setup
- Run Redis
-
Antivirus Teardown
- Normal Teardown
- Shutdown Process With Children ${REDIS_PID}
+ Rspamd Redis Teardown
Shutdown clamav
Shutdown fport
Shutdown avast
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${RSPAMD_TESTDIR}/configs/p0f.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
-${MESSAGE2} ${RSPAMD_TESTDIR}/messages/freemail.eml
-${REDIS_SCOPE} Suite
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/p0f.conf
+${MESSAGE2} ${RSPAMD_TESTDIR}/messages/freemail.eml
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${REDIS_SCOPE} Suite
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
p0f MISS
*** Keywords ***
p0f Setup
- New Setup
- Run Redis
+ Rspamd Redis Setup
p0f Teardown
- Normal Teardown
+ Rspamd Redis Teardown
Shutdown p0f
Terminate All Processes kill=True
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${RSPAMD_TESTDIR}/configs/url_redirector.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/redir.eml
-${REDIS_SCOPE} Suite
-${RSPAMD_SCOPE} Suite
-${SETTINGS} {symbols_enabled=[URL_REDIRECTOR_CHECK]}
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../../contrib/publicsuffix/effective_tld_names.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/url_redirector.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/redir.eml
+${REDIS_SCOPE} Suite
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../../contrib/publicsuffix/effective_tld_names.dat
+${SETTINGS} {symbols_enabled=[URL_REDIRECTOR_CHECK]}
*** Test Cases ***
RESOLVE URLS
*** Keywords ***
Urlredirector Setup
- ${RSPAMD_TMPDIR} = Make Temporary Directory
- Set Suite Variable ${RSPAMD_TMPDIR}
- Set Suite Variable ${REDIS_TMPDIR} ${RSPAMD_TMPDIR}
- Run Redis
Run Dummy Http
- New Setup
+ Rspamd Redis Setup
Urlredirector Teardown
- Normal Teardown
+ Rspamd Redis Teardown
#Stop Dummy Http
Terminate All Processes kill=True
*** Settings ***
-Suite Setup Milter Setup
-Suite Teardown Generic Teardown
+Suite Setup Rspamd Setup
+Suite Teardown Rspamd Teardown
Library Process
Library ${RSPAMD_TESTDIR}/lib/rspamd.py
Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${RSPAMD_TESTDIR}/configs/milter.conf
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/milter.conf
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
ACCEPT
Milter Test combined.lua
*** Keywords ***
-Milter Setup
- New Setup
-
Milter Test
[Arguments] ${mtlua}
${result} = Run Process miltertest -Dport\=${RSPAMD_PORT_PROXY} -Dhost\=${RSPAMD_LOCAL_ADDR} -s ${RSPAMD_TESTDIR}/lua/miltertest/${mtlua}
${clickhouse_pid} = Get File ${RSPAMD_TMPDIR}/clickhouse/clickhouse.pid
Shutdown Process With Children ${clickhouse_pid}
Log File ${RSPAMD_TMPDIR}/clickhouse/clickhouse-server.err.log
- Simple Teardown
+ Rspamd Teardown
Prepare rspamd
&{d} = Run Rspamd CONFIG=${RSPAMD_TESTDIR}/configs/clickhouse.conf TMPDIR=${RSPAMD_TMPDIR}
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
+${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/http.lua
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
-${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
-${RSPAMD_SCOPE} Test
+${RSPAMD_SCOPE} Test
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
Simple HTTP request
Http Setup
Run Dummy Http
Run Dummy Https
- New Setup
+ Rspamd Setup
Http Teardown
${http_pid} = Get File /tmp/dummy_http.pid
Shutdown Process With Children ${http_pid}
${https_pid} = Get File /tmp/dummy_https.pid
Shutdown Process With Children ${https_pid}
- Normal Teardown
+ Rspamd Teardown
Run Dummy Http
${result} = Start Process ${RSPAMD_TESTDIR}/util/dummy_http.py
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/tcp.lua
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
-${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
-${RSPAMD_SCOPE} Suite
+${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/tcp.lua
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
Simple TCP request
Servers Setup
Run Dummy Http
Run Dummy Ssl
- New Setup
+ Rspamd Setup
Servers Teardown
${http_pid} = Get File /tmp/dummy_http.pid
Shutdown Process With Children ${http_pid}
${ssl_pid} = Get File /tmp/dummy_ssl.pid
Shutdown Process With Children ${ssl_pid}
- Normal Teardown
+ Rspamd Teardown
Run Dummy Http
[Arguments]
*** Settings ***
-Test Setup New Setup
-Test Teardown Normal Teardown
+Test Setup Rspamd Setup
+Test Teardown Rspamd Teardown
Library Process
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_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/tcp.lua
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
-${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
-${RSPAMD_SCOPE} Test
+${RSPAMD_SCOPE} Test
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
*** Settings ***
-Test Setup Redis Setup
-Test Teardown Normal Teardown
+Test Setup Rspamd Redis Setup
+Test Teardown Rspamd Redis Teardown
Library Process
Library ${RSPAMD_TESTDIR}/lib/rspamd.py
Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
*** Variables ***
-${REDIS_SCOPE} Test
-${RSPAMD_SCOPE} Test
-${CONFIG} ${RSPAMD_TESTDIR}/configs/redis.conf
+${CONFIG} ${RSPAMD_TESTDIR}/configs/redis.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${REDIS_SCOPE} Test
${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/redis.lua
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${RSPAMD_SCOPE} Test
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
Expect Symbol With Exact Options REDIS hello from lua on redis
Expect Symbol With Exact Options REDIS_ASYNC test value
Expect Symbol With Exact Options REDIS_ASYNC201809 test value
-
-*** Keywords ***
-Redis Setup
- Run Redis
- New Setup
*** Settings ***
Documentation Test the case when trying to connect to nowhere
... (i.e. redis is not running)
-Test Setup New Setup
-Test Teardown Normal Teardown
+Test Setup Rspamd Setup
+Test Teardown Rspamd Teardown
Library Process
Library ${RSPAMD_TESTDIR}/lib/rspamd.py
Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
*** Variables ***
-${REDIS_SCOPE} Test
-${RSPAMD_SCOPE} Test
-${CONFIG} ${RSPAMD_TESTDIR}/configs/redis.conf
+${CONFIG} ${RSPAMD_TESTDIR}/configs/redis.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${REDIS_SCOPE} Test
${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/redis.lua
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${RSPAMD_SCOPE} Test
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
*** Settings ***
-Test Setup New Setup
-Test Teardown Normal Teardown
+Test Setup Rspamd Setup
+Test Teardown Rspamd Teardown
Library Process
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_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/dns.lua
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
-${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
-${RSPAMD_SCOPE} Test
+${RSPAMD_SCOPE} Test
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
Simple DNS request
*** Settings ***
-Test Setup New Setup
-Test Teardown Normal Teardown
+Test Setup Rspamd Setup
+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/regexp.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/newlines.eml
-${UTF_MESSAGE} ${RSPAMD_TESTDIR}/messages/utf.eml
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
-${RSPAMD_SCOPE} Test
+${CONFIG} ${RSPAMD_TESTDIR}/configs/regexp.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/newlines.eml
+${RSPAMD_SCOPE} Test
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${UTF_MESSAGE} ${RSPAMD_TESTDIR}/messages/utf.eml
*** Test Cases ***
*** Settings ***
-Test Setup Regex Setup
-Test Teardown Regex Teardown
+Test Setup Rspamd Setup
+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/selector.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/subject1.eml
-${UTF_MESSAGE} ${RSPAMD_TESTDIR}/messages/utf.eml
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
-${RSPAMD_SCOPE} Suite
+${CONFIG} ${RSPAMD_TESTDIR}/configs/selector.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/subject1.eml
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${UTF_MESSAGE} ${RSPAMD_TESTDIR}/messages/utf.eml
*** Test Cases ***
Expect Symbol CONFIG_SELECTOR_RE_RCPT_SUBJECT
Expect Symbol LUA_SELECTOR_RE
-
-*** Keywords ***
-Regex Setup
- New Setup
-
-Regex Teardown
- Normal Teardown
*** Settings ***
-Suite Setup Rules Setup
-Suite Teardown Rules Teardown
+Suite Setup Rspamd Setup
+Suite 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/regexp.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/newlines.eml
-${MESSAGE1} ${RSPAMD_TESTDIR}/messages/fws_fn.eml
-${MESSAGE2} ${RSPAMD_TESTDIR}/messages/fws_fp.eml
-${MESSAGE3} ${RSPAMD_TESTDIR}/messages/fws_tp.eml
-${MESSAGE4} ${RSPAMD_TESTDIR}/messages/broken_richtext.eml
-${MESSAGE5} ${RSPAMD_TESTDIR}/messages/badboundary.eml
-${MESSAGE6} ${RSPAMD_TESTDIR}/messages/pdf_encrypted.eml
-${MESSAGE7} ${RSPAMD_TESTDIR}/messages/pdf_js.eml
-${MESSAGE8} ${RSPAMD_TESTDIR}/messages/yand_forward.eml
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
-${RSPAMD_SCOPE} Suite
+${CONFIG} ${RSPAMD_TESTDIR}/configs/regexp.conf
+${MESSAGE1} ${RSPAMD_TESTDIR}/messages/fws_fn.eml
+${MESSAGE2} ${RSPAMD_TESTDIR}/messages/fws_fp.eml
+${MESSAGE3} ${RSPAMD_TESTDIR}/messages/fws_tp.eml
+${MESSAGE4} ${RSPAMD_TESTDIR}/messages/broken_richtext.eml
+${MESSAGE5} ${RSPAMD_TESTDIR}/messages/badboundary.eml
+${MESSAGE6} ${RSPAMD_TESTDIR}/messages/pdf_encrypted.eml
+${MESSAGE7} ${RSPAMD_TESTDIR}/messages/pdf_js.eml
+${MESSAGE8} ${RSPAMD_TESTDIR}/messages/yand_forward.eml
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/newlines.eml
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
Scan File ${RSPAMD_TESTDIR}/messages/replyto_addr_eq_from.eml
Expect Symbol REPLYTO_ADDR_EQ_FROM
-
-*** Keywords ***
-Rules Setup
- New Setup
-
-Rules Teardown
- Normal Teardown
*** Settings ***
-Suite Setup New Setup
-Suite Teardown Normal Teardown
+Suite Setup Rspamd Setup
+Suite 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_script.conf
-${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/test_fname.lua
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_script.conf
+${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/test_fname.lua
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
*** Settings ***
-Suite Setup Greylist Setup
-Suite Teardown Greylist Teardown
+Suite Setup Rspamd Redis Setup
+Suite Teardown Rspamd Redis Teardown
Library ${RSPAMD_TESTDIR}/lib/rspamd.py
Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${RSPAMD_TESTDIR}/configs/greylist.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
-${REDIS_SCOPE} Suite
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/greylist.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${REDIS_SCOPE} Suite
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
GREYLIST NEW
Sleep 4s Wait greylisting timeout
Scan File ${MESSAGE}
Expect Symbol With Option GREYLIST pass
-
-*** Keywords ***
-Greylist Setup
- New Setup
- Run Redis
-
-Greylist Teardown
- Normal Teardown
- Shutdown Process With Children ${REDIS_PID}
- Terminate All Processes kill=True
*** Settings ***
-Suite Setup Rbl Setup
-Suite Teardown Rbl Teardown
+Suite Setup Rspamd Setup
+Suite 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/rbl.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/rbl.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
RBL FROM MISS
Scan File ${RSPAMD_TESTDIR}/messages/btc.eml From=user@example.org Helo=example.org
Expect Symbol With Option RBL_SELECTOR_MULTIPLE example.org:sel_from
Expect Symbol With Option RBL_SELECTOR_MULTIPLE example.org:sel_helo
-
-*** Keywords ***
-Rbl Setup
- New Setup
-
-Rbl Teardown
- Normal Teardown
- Terminate All Processes kill=True
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
-${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
-${RSPAMD_SCOPE} Test
+${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/udp.lua
+${RSPAMD_SCOPE} Test
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
Simple UDP request
*** Keywords ***
UDP Setup
Run Dummy UDP
- New Setup
+ Rspamd Setup
UDP Teardown
${udp_pid} = Get File /tmp/dummy_udp.pid
Shutdown Process With Children ${udp_pid}
- Normal Teardown
+ Rspamd Teardown
Run Dummy UDP
[Arguments]
*** Settings ***
-Suite Setup New Setup
-Suite Teardown Normal Teardown
+Suite Setup Rspamd Setup
+Suite 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/arc_signing/simple.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none.eml
-${MESSAGE_FAIL} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none1.eml
-${REDIS_SCOPE} Suite
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/arc_signing/simple.conf
+${MESSAGE_FAIL} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none1.eml
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none.eml
+${REDIS_SCOPE} Suite
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
TEST SIGNED
*** Settings ***
Suite Setup ARC Signing Setup
-Suite Teardown Normal Teardown
+Suite Teardown Rspamd Redis Teardown
Library ${RSPAMD_TESTDIR}/lib/rspamd.py
Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${RSPAMD_TESTDIR}/configs/arc_signing/redis.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none.eml
-${REDIS_SCOPE} Suite
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/arc_signing/redis.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none.eml
+${REDIS_SCOPE} Suite
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
TEST SIGNED
*** Keywords ***
ARC Signing Setup
- Run Redis
+ Rspamd Redis Setup
Redis HSET TEST_DKIM_SELECTORS cacophony.za.org arc
${key} = Get File ${RSPAMD_TESTDIR}/configs/dkim.key
Redis HSET TEST_DKIM_KEYS arc.cacophony.za.org ${key}
- New Setup
*** Settings ***
-Suite Setup ARC Setup
-Suite Teardown Simple Teardown
+Suite Setup Rspamd Setup
+Suite 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/arc.conf
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../../contrib/publicsuffix/effective_tld_names.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/arc.conf
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../../contrib/publicsuffix/effective_tld_names.dat
*** Test Cases ***
ARC ALLOW CHECK
Scan File ${RSPAMD_TESTDIR}/messages/arcbad.eml
Expect Symbol ARC_INVALID
-
-*** Keywords ***
-ARC Setup
- New Setup
*** Settings ***
-Suite Setup Neural Setup
-Suite Teardown Normal Teardown
+Suite Setup Rspamd Redis Setup
+Suite Teardown Rspamd Redis Teardown
Library Process
Library ${RSPAMD_TESTDIR}/lib/rspamd.py
Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
-${CONFIG} ${RSPAMD_TESTDIR}/configs/neural.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
-${REDIS_SCOPE} Suite
-${RSPAMD_SCOPE} Suite
+${CONFIG} ${RSPAMD_TESTDIR}/configs/neural.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${REDIS_SCOPE} Suite
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
Train
Expect Symbol NEURAL_HAM_SHORT_PCA
Do Not Expect Symbol NEURAL_SPAM_SHORT
Do Not Expect Symbol NEURAL_SPAM_SHORT_PCA
-
-*** Keywords ***
-Neural Setup
- Run Redis
- New Setup
*** Settings ***
-Suite Setup Neural Setup
-Suite Teardown Normal Teardown
+Suite Setup Rspamd Redis Setup
+Suite Teardown Rspamd Redis Teardown
Library Process
Library ${RSPAMD_TESTDIR}/lib/rspamd.py
Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
-${CONFIG} ${RSPAMD_TESTDIR}/configs/neural_noauto.conf
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
-${REDIS_SCOPE} Suite
-${RSPAMD_SCOPE} Suite
+${CONFIG} ${RSPAMD_TESTDIR}/configs/neural_noauto.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${REDIS_SCOPE} Suite
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
Collect training vectors & train manually
Scan File ${MESSAGE} Settings={symbols_enabled = ["SPAM_SYMBOL"];groups_enabled=["neural"];symbols_disabled = ["NEURAL_LEARN"]}
Do Not Expect Symbol NEURAL_SPAM_SHORT
Expect Symbol NEURAL_HAM_SHORT
-
-*** Keywords ***
-Neural Setup
- Run Redis
- New Setup
*** Settings ***
-Suite Setup Surbl Setup
-Suite Teardown Surbl Teardown
+Suite Setup Rspamd Setup
+Suite 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/surbl.conf
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/surbl.conf
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
SURBL resolve ip
SURBL url compose map 3
Scan File ${RSPAMD_TESTDIR}/messages/url13.eml
Expect Symbol With Exact Options BAD_SUBDOMAIN 41.black.sanchez.com:url
-
-*** Keywords ***
-Surbl Setup
- New Setup
-
-Surbl Teardown
- Normal Teardown
- Terminate All Processes kill=True
*** Settings ***
-Suite Setup Magic Setup
-Suite Teardown Simple Teardown
+Suite Setup Rspamd Setup
+Suite 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_script.conf
-${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/magic.lua
-${RSPAMD_SCOPE} Suite
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_script.conf
+${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/magic.lua
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
Magic detections bundle 1
... MAGIC_SYM_BAT_54
... MAGIC_SYM_ICS_55
... MAGIC_SYM_VCF_56
-
-*** Keywords ***
-Magic Setup
- New Setup
*** Settings ***
-Suite Setup Force Actions Setup
-Suite Teardown Force Actions Teardown
+Suite Setup Rspamd Setup
+Suite 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/force_actions.conf
-${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/url7.eml
-${RSPAMD_SCOPE} Suite
+${CONFIG} ${RSPAMD_TESTDIR}/configs/force_actions.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/url7.eml
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
FORCE ACTIONS from reject to add header
Expect Action reject
Expect Symbol FORCE_ACTION_FORCE_ADD_HEADER_TO_REJECT
-
-*** Keywords ***
-Force Actions Setup
- New Setup
-
-Force Actions Teardown
- Normal Teardown
- Terminate All Processes kill=True
+++ /dev/null
-sync_keypair {
- pubkey = "kmtnjffjzq9bq8qe14ii4gb4e1ihuq84ubfibe79ba85ob5nr3my";
- privkey = "ea6etw8a47e66ypc38mmdnrwskx7nj86gqydwo7jrmfsxeryny1y";
- id = "6jxoadfy8gr6dq1nyafoa5ym3391sioz3fbbq5qug7g9dchmgjr4w4kxjzqkkc9rzd7eftngyzwau9ooqe9g96bxiwq6c3xo8965gud";
- encoding = "base32";
- algorithm = "curve25519";
-}
-slave {
- name = "slave1";
- hosts = "${RSPAMD_LOCAL_ADDR}:${PORT_FUZZY_SLAVE}";
- key = "caen11q4eczdqgsb8u55zmmoh4z5qxd61y1rph7pz1fcubmfccdy";
-}
+++ /dev/null
-sync_keypair {
- pubkey = "caen11q4eczdqgsb8u55zmmoh4z5qxd61y1rph7pz1fcubmfccdy";
- privkey = "oi4k9g9prsqmk19xio7itaobmbz7yonktren1j5qwni1t88mwfty";
- id = "qdwzxmoxpno4ge68ba1ai35n65q7mrqdp8dpp33h8haxy61omt881mep4944w1n6izuk64ktypqymrq55zkx3qob1ayfz9hxjtxbmxb";
- encoding = "base32";
- algorithm = "curve25519";
- type = "kex";
-}
-
-masters = "${RSPAMD_LOCAL_ADDR}";
-master_key = "kmtnjffjzq9bq8qe14ii4gb4e1ihuq84ubfibe79ba85ob5nr3my";
+++ /dev/null
-options = {
- filters = ["spf", "dkim", "regexp"]
- url_tld = "${RSPAMD_URL_TLD}"
- pidfile = "${RSPAMD_TMPDIR}/rspamd.pid"
- lua_path = "${INSTALLROOT}/share/rspamd/lib/?.lua"
- dns {
- nameserver = ["8.8.8.8", "8.8.4.4"];
- retransmits = 10;
- timeout = 2s;
- }
-}
-logging = {
- type = "file",
- level = "debug"
- filename = "${RSPAMD_TMPDIR}/rspamd.log"
-}
-metric = {
- name = "default",
- actions = {
- reject = 100500,
- }
- unknown_weight = 1
-}
-worker {
- type = normal
- bind_socket = ${RSPAMD_LOCAL_ADDR}:${RSPAMD_PORT_NORMAL}
- count = 1
- task_timeout = 60s;
-}
-worker {
- type = controller
- bind_socket = ${RSPAMD_LOCAL_ADDR}:${RSPAMD_PORT_CONTROLLER}
- count = 1
- secure_ip = ["127.0.0.1", "::1"];
- stats_path = "${RSPAMD_TMPDIR}/stats.ucl"
-}
-modules {
- path = "${RSPAMD_TESTDIR}/../../src/plugins/lua/"
-}
-lua = "${LUA}";
-${PLUGIN_CONFIG}
... msg=Symbol ${symbol} was not expected to be found in result
END
-Generic Setup
- [Arguments] &{kw}
- New Setup &{kw}
-
Expect Action
[Arguments] ${action}
Should Be Equal ${SCAN_RESULT}[action] ${action}
... ELSE Fail message="Don't know what to do with scope: ${scope}"
END
-Generic Teardown
- # Robot Framework 4.0
- #Run Keyword If '${CONTROLLER_ERRORS}' == 'True' Run Keyword And Warn On Failure Check Controller Errors
- Run Keyword If '${CONTROLLER_ERRORS}' == 'True' Check Controller Errors
- Shutdown Process With Children ${RSPAMD_PID}
- Save Run Results ${RSPAMD_TMPDIR} rspamd.conf rspamd.log redis.log clickhouse-config.xml
- Log does not contain segfault record
- Collect Lua Coverage
- Cleanup Temporary Directory ${RSPAMD_TMPDIR}
-
- # Possibly deal with Redis
- ${redis_tmpdir} = Get Variable Value ${REDIS_TMPDIR}
- Run Keyword If '${redis_tmpdir}' != 'None' Cleanup Temporary Directory ${REDIS_TMPDIR}
- ${redis_pid} = Get Variable Value ${REDIS_PID}
- Run Keyword If '${redis_pid}' == 'None' Return From Keyword
- Shutdown Process With Children ${redis_pid}
-
Log does not contain segfault record
${log} = Get File ${RSPAMD_TMPDIR}/rspamd.log encoding_errors=ignore
Should not contain ${log} Segmentation fault: msg=Segmentation fault detected
-New Setup
- [Arguments] &{kw}
-
- # Create and chown temporary directory
- ${RSPAMD_TMPDIR} = Make Temporary Directory
- Set Directory Ownership ${RSPAMD_TMPDIR} ${RSPAMD_USER} ${RSPAMD_GROUP}
-
- # Export ${RSPAMD_TMPDIR} to appropriate scope according to ${RSPAMD_SCOPE}
- Export Scoped Variables ${RSPAMD_SCOPE} RSPAMD_TMPDIR=${RSPAMD_TMPDIR}
-
- New Run Rspamd
-
-Normal Teardown
- Generic Teardown
-
Redis HSET
[Arguments] ${hash} ${key} ${value}
${result} = Run Process redis-cli -h ${RSPAMD_REDIS_ADDR} -p ${RSPAMD_REDIS_PORT}
Log ${result.stdout}
Should Be Equal As Integers ${result.rc} 0
+Redis Teardown
+ ${redis_pid} = Get Variable Value ${REDIS_PID}
+ Shutdown Process With Children ${redis_pid}
+ Cleanup Temporary Directory ${REDIS_TMPDIR}
+
+Rspamd Setup
+ # Create and chown temporary directory
+ ${RSPAMD_TMPDIR} = Make Temporary Directory
+ Set Directory Ownership ${RSPAMD_TMPDIR} ${RSPAMD_USER} ${RSPAMD_GROUP}
+
+ # Export ${RSPAMD_TMPDIR} to appropriate scope according to ${RSPAMD_SCOPE}
+ Export Scoped Variables ${RSPAMD_SCOPE} RSPAMD_TMPDIR=${RSPAMD_TMPDIR}
+
+ Run Rspamd
+
+Rspamd Redis Setup
+ Run Redis
+ Rspamd Setup
+
+Rspamd Teardown
+ # Robot Framework 4.0
+ #Run Keyword If '${CONTROLLER_ERRORS}' == 'True' Run Keyword And Warn On Failure Check Controller Errors
+ Run Keyword If '${CONTROLLER_ERRORS}' == 'True' Check Controller Errors
+ Shutdown Process With Children ${RSPAMD_PID}
+ Save Run Results ${RSPAMD_TMPDIR} rspamd.conf rspamd.log redis.log clickhouse-config.xml
+ Log does not contain segfault record
+ Collect Lua Coverage
+ Cleanup Temporary Directory ${RSPAMD_TMPDIR}
+
+Rspamd Redis Teardown
+ Rspamd Teardown
+ Redis Teardown
+
Run Redis
${RSPAMD_TMPDIR} = Make Temporary Directory
${template} = Get File ${RSPAMD_TESTDIR}/configs/redis-server.conf
Log ${redis_log}
Run Rspamd
- New Run Rspamd
-
-Run Nginx
- ${template} = Get File ${RSPAMD_TESTDIR}/configs/nginx.conf
- ${config} = Replace Variables ${template}
- Create File ${RSPAMD_TMPDIR}/nginx.conf ${config}
- Log ${config}
- ${result} = Run Process nginx -c ${RSPAMD_TMPDIR}/nginx.conf
- Run Keyword If ${result.rc} != 0 Log ${result.stderr}
- Should Be Equal As Integers ${result.rc} 0
- Wait Until Keyword Succeeds 10x 1 sec Check Pidfile ${RSPAMD_TMPDIR}/nginx.pid timeout=0.5s
- Wait Until Keyword Succeeds 5x 1 sec TCP Connect ${NGINX_ADDR} ${NGINX_PORT}
- ${NGINX_PID} = Get File ${RSPAMD_TMPDIR}/nginx.pid
- Run Keyword If '${NGINX_SCOPE}' == 'Test' Set Test Variable ${NGINX_PID}
- ... ELSE IF '${NGINX_SCOPE}' == 'Suite' Set Suite Variable ${NGINX_PID}
- ${nginx_log} = Get File ${RSPAMD_TMPDIR}/nginx.log
- Log ${nginx_log}
-
-Run Rspamc
- [Arguments] @{args}
- ${result} = Run Process ${RSPAMC} -t 60 --header Queue-ID\=${TEST NAME}
- ... @{args} env:LD_LIBRARY_PATH=${RSPAMD_TESTDIR}/../../contrib/aho-corasick
- Log ${result.stdout}
- [Return] ${result}
-
-New Run Rspamd
Export Rspamd Variables To Environment
# Dump templated config or errors to log
${RSPAMD_PID} = Get File ${RSPAMD_TMPDIR}/rspamd.pid
Export Scoped Variables ${RSPAMD_SCOPE} RSPAMD_PID=${RSPAMD_PID}
-Simple Teardown
- Generic Teardown
+Run Nginx
+ ${template} = Get File ${RSPAMD_TESTDIR}/configs/nginx.conf
+ ${config} = Replace Variables ${template}
+ Create File ${RSPAMD_TMPDIR}/nginx.conf ${config}
+ Log ${config}
+ ${result} = Run Process nginx -c ${RSPAMD_TMPDIR}/nginx.conf
+ Run Keyword If ${result.rc} != 0 Log ${result.stderr}
+ Should Be Equal As Integers ${result.rc} 0
+ Wait Until Keyword Succeeds 10x 1 sec Check Pidfile ${RSPAMD_TMPDIR}/nginx.pid timeout=0.5s
+ Wait Until Keyword Succeeds 5x 1 sec TCP Connect ${NGINX_ADDR} ${NGINX_PORT}
+ ${NGINX_PID} = Get File ${RSPAMD_TMPDIR}/nginx.pid
+ Run Keyword If '${NGINX_SCOPE}' == 'Test' Set Test Variable ${NGINX_PID}
+ ... ELSE IF '${NGINX_SCOPE}' == 'Suite' Set Suite Variable ${NGINX_PID}
+ ${nginx_log} = Get File ${RSPAMD_TMPDIR}/nginx.log
+ Log ${nginx_log}
+
+Run Rspamc
+ [Arguments] @{args}
+ ${result} = Run Process ${RSPAMC} -t 60 --header Queue-ID\=${TEST NAME}
+ ... @{args} env:LD_LIBRARY_PATH=${RSPAMD_TESTDIR}/../../contrib/aho-corasick
+ Log ${result.stdout}
+ [Return] ${result}
Scan File By Reference
[Arguments] ${filename} &{headers}