Bläddra i källkod

[Test] Cleanup

 - Use consistent naming for setup/teardown
 - Remove some unused files
 - Sort & align variables
tags/3.0
Andrew Lewis 3 år sedan
förälder
incheckning
5569dbacfc
74 ändrade filer med 477 tillägg och 702 borttagningar
  1. 6
    6
      test/functional/cases/100_general.robot
  2. 10
    10
      test/functional/cases/101_lua.robot
  3. 19
    28
      test/functional/cases/102_multimap.robot
  4. 6
    6
      test/functional/cases/103_password.robot
  5. 9
    14
      test/functional/cases/104_get_from.robot
  6. 5
    9
      test/functional/cases/105_mimetypes.robot
  7. 5
    5
      test/functional/cases/106_mid.robot
  8. 13
    13
      test/functional/cases/108_settings.robot
  9. 6
    10
      test/functional/cases/109_composites.robot
  10. 8
    15
      test/functional/cases/110_statistics/lib.robot
  11. 4
    4
      test/functional/cases/110_statistics/redis-keyed-siphash.robot
  12. 4
    4
      test/functional/cases/110_statistics/redis-keyed-xxhash.robot
  13. 3
    3
      test/functional/cases/110_statistics/redis-plain-siphash.robot
  14. 3
    3
      test/functional/cases/110_statistics/redis-plain-xxhash.robot
  15. 8
    12
      test/functional/cases/114_phishing.robot
  16. 5
    9
      test/functional/cases/115_dmarc.robot
  17. 5
    9
      test/functional/cases/116_dkim.robot
  18. 5
    9
      test/functional/cases/117_spf.robot
  19. 1
    1
      test/functional/cases/120_fuzzy/encrypted.robot
  20. 1
    1
      test/functional/cases/120_fuzzy/fasthash-keyed.robot
  21. 1
    1
      test/functional/cases/120_fuzzy/fasthash.robot
  22. 1
    1
      test/functional/cases/120_fuzzy/general.robot
  23. 20
    29
      test/functional/cases/120_fuzzy/lib.robot
  24. 1
    1
      test/functional/cases/120_fuzzy/mumhash-keyed.robot
  25. 1
    1
      test/functional/cases/120_fuzzy/mumhash.robot
  26. 1
    1
      test/functional/cases/120_fuzzy/siphash-keyed.robot
  27. 1
    1
      test/functional/cases/120_fuzzy/siphash.robot
  28. 1
    1
      test/functional/cases/120_fuzzy/xxhash-keyed.robot
  29. 1
    1
      test/functional/cases/120_fuzzy/xxhash.robot
  30. 6
    6
      test/functional/cases/121_json/100_preresult.robot
  31. 6
    6
      test/functional/cases/121_json/101_simple.robot
  32. 0
    3
      test/functional/cases/121_json/lib.robot
  33. 10
    16
      test/functional/cases/123_whitelist.robot
  34. 5
    5
      test/functional/cases/125_map_reload.robot
  35. 8
    8
      test/functional/cases/131_dkim_signing/001_simple.robot
  36. 7
    8
      test/functional/cases/131_dkim_signing/002_redis.robot
  37. 8
    8
      test/functional/cases/131_dkim_signing/003_eddsa.robot
  38. 7
    7
      test/functional/cases/131_dkim_signing/004_invalidate_key.robot
  39. 8
    8
      test/functional/cases/131_dkim_signing/005_multiple.robot
  40. 5
    5
      test/functional/cases/131_dkim_signing/006_milter.robot
  41. 8
    8
      test/functional/cases/131_dkim_signing/007_sign_maps.robot
  42. 5
    5
      test/functional/cases/135_spamassassin.robot
  43. 8
    8
      test/functional/cases/140_proxy.robot
  44. 4
    7
      test/functional/cases/151_rspamadm_async.robot
  45. 8
    13
      test/functional/cases/160_antivirus.robot
  46. 8
    9
      test/functional/cases/161_p0f.robot
  47. 8
    12
      test/functional/cases/162_url_redirector.robot
  48. 5
    8
      test/functional/cases/180_milter.robot
  49. 1
    1
      test/functional/cases/210_clickhouse/001_migration.robot
  50. 6
    6
      test/functional/cases/220_http.robot
  51. 7
    7
      test/functional/cases/230_tcp.robot
  52. 6
    6
      test/functional/cases/231_tcp_down.robot
  53. 7
    12
      test/functional/cases/240_redis.robot
  54. 7
    7
      test/functional/cases/241_redis_is_dead.robot
  55. 6
    6
      test/functional/cases/250_dns.robot
  56. 7
    7
      test/functional/cases/260_regex.robot
  57. 7
    14
      test/functional/cases/270_selector.robot
  58. 14
    21
      test/functional/cases/280_rules.robot
  59. 6
    6
      test/functional/cases/281_fnames.robot
  60. 7
    17
      test/functional/cases/290_greylist.robot
  61. 6
    14
      test/functional/cases/300_rbl.robot
  62. 6
    6
      test/functional/cases/310_udp.robot
  63. 8
    8
      test/functional/cases/320_arc_signing/001_simple.robot
  64. 7
    8
      test/functional/cases/320_arc_signing/002_redis.robot
  65. 5
    9
      test/functional/cases/321_arc_check.robot
  66. 7
    12
      test/functional/cases/330_neural/001_autotrain.robot
  67. 7
    12
      test/functional/cases/330_neural/002_manualtrain.robot
  68. 5
    13
      test/functional/cases/340_surbl.robot
  69. 6
    10
      test/functional/cases/350_magic.robot
  70. 6
    14
      test/functional/cases/360_force_actions.robot
  71. 0
    12
      test/functional/configs/fuzzy_master_worker.conf
  72. 0
    11
      test/functional/configs/fuzzy_slave_worker.conf
  73. 0
    41
      test/functional/configs/pluginsplus.conf
  74. 55
    64
      test/functional/lib/rspamd.robot

+ 6
- 6
test/functional/cases/100_general.robot Visa fil

@@ -1,15 +1,15 @@
*** 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

+ 10
- 10
test/functional/cases/101_lua.robot Visa fil

@@ -1,17 +1,17 @@
*** 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
@@ -73,7 +73,7 @@ Rule conditions
Lua Setup
[Arguments] ${RSPAMD_LUA_SCRIPT}
Set Test Variable ${RSPAMD_LUA_SCRIPT}
New Setup
Rspamd Setup

Lua Replace Setup
[Arguments] ${LUA_SCRIPT_UNESC}
@@ -85,7 +85,7 @@ Lua Replace Setup

Lua Replace Teardown
Remove File ${RSPAMD_LUA_SCRIPT}
Normal Teardown
Rspamd Teardown

TLD Setup
[Arguments] ${RSPAMD_LUA_SCRIPT}

+ 19
- 28
test/functional/cases/102_multimap.robot Visa fil

@@ -1,28 +1,28 @@
*** 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
@@ -335,12 +335,3 @@ FREEMAIL_CC
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}

+ 6
- 6
test/functional/cases/103_password.robot Visa fil

@@ -1,15 +1,15 @@
*** 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
@@ -52,4 +52,4 @@ Password Setup
[Arguments] ${RSPAMD_PASSWORD} ${RSPAMD_ENABLE_PASSWORD}=nq2
Set Test Variable ${RSPAMD_PASSWORD}
Set Test Variable ${RSPAMD_ENABLE_PASSWORD}
New Setup
Rspamd Setup

+ 9
- 14
test/functional/cases/104_get_from.robot Visa fil

@@ -1,19 +1,18 @@
*** 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
@@ -51,7 +50,3 @@ task:get_from('mime') - quoted in the middle of DN (outer spaces)
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

+ 5
- 9
test/functional/cases/105_mimetypes.robot Visa fil

@@ -1,14 +1,14 @@
*** 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
@@ -64,7 +64,3 @@ Exe file, but name in filename_whitelist
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

+ 5
- 5
test/functional/cases/106_mid.robot Visa fil

@@ -1,14 +1,14 @@
*** 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

+ 13
- 13
test/functional/cases/108_settings.robot Visa fil

@@ -6,17 +6,17 @@ Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
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
@@ -255,8 +255,8 @@ PRIORITY
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

+ 6
- 10
test/functional/cases/109_composites.robot Visa fil

@@ -1,15 +1,15 @@
*** 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
@@ -76,7 +76,3 @@ Composites - Opts RE Hit 3
Expect Symbol With Score SYMOPTS4 6.00
Do Not Expect Symbol SYMOPTS2
Do Not Expect Symbol SYMOPTS1

*** Keywords ***
Composites Setup
New Setup

+ 8
- 15
test/functional/cases/110_statistics/lib.robot Visa fil

@@ -4,15 +4,15 @@ Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
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
@@ -45,10 +45,3 @@ Relearn 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

+ 4
- 4
test/functional/cases/110_statistics/redis-keyed-siphash.robot Visa fil

@@ -1,12 +1,12 @@
*** 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

+ 4
- 4
test/functional/cases/110_statistics/redis-keyed-xxhash.robot Visa fil

@@ -1,12 +1,12 @@
*** 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

+ 3
- 3
test/functional/cases/110_statistics/redis-plain-siphash.robot Visa fil

@@ -1,11 +1,11 @@
*** 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

+ 3
- 3
test/functional/cases/110_statistics/redis-plain-xxhash.robot Visa fil

@@ -1,11 +1,11 @@
*** 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

+ 8
- 12
test/functional/cases/114_phishing.robot Visa fil

@@ -1,17 +1,17 @@
*** 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
@@ -25,7 +25,3 @@ TEST PHISHING STRICT ONE
TEST PHISHING STRICT TWO
Scan File ${MESSAGE3}
Expect Symbol STRICTER_PHISHING

*** Keywords ***
Phishing Setup
New Setup

+ 5
- 9
test/functional/cases/115_dmarc.robot Visa fil

@@ -1,14 +1,14 @@
*** 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
@@ -86,7 +86,3 @@ DMARC PCT ZERO SP QUARANTINE
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

+ 5
- 9
test/functional/cases/116_dkim.robot Visa fil

@@ -1,14 +1,14 @@
*** 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
@@ -51,7 +51,3 @@ DKIM Verify ED25519 PASS
DKIM Verify ED25519 REJECT
Scan File ${RSPAMD_TESTDIR}/messages/ed25519-broken.eml
Expect Symbol R_DKIM_REJECT

*** Keywords ***
DKIM Setup
New Setup

+ 5
- 9
test/functional/cases/117_spf.robot Visa fil

@@ -1,14 +1,14 @@
*** 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
@@ -135,7 +135,3 @@ SPF UPPERCASE
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

+ 1
- 1
test/functional/cases/120_fuzzy/encrypted.robot Visa fil

@@ -1,6 +1,6 @@
*** Settings ***
Suite Setup Fuzzy Setup Encrypted Siphash
Suite Teardown Fuzzy Teardown
Suite Teardown Rspamd Redis Teardown
Resource lib.robot

*** Test Cases ***

+ 1
- 1
test/functional/cases/120_fuzzy/fasthash-keyed.robot Visa fil

@@ -1,6 +1,6 @@
*** Settings ***
Suite Setup Fuzzy Setup Keyed Fasthash
Suite Teardown Fuzzy Teardown
Suite Teardown Rspamd Redis Teardown
Resource lib.robot

*** Test Cases ***

+ 1
- 1
test/functional/cases/120_fuzzy/fasthash.robot Visa fil

@@ -1,6 +1,6 @@
*** Settings ***
Suite Setup Fuzzy Setup Plain Fasthash
Suite Teardown Fuzzy Teardown
Suite Teardown Rspamd Redis Teardown
Resource lib.robot

*** Test Cases ***

+ 1
- 1
test/functional/cases/120_fuzzy/general.robot Visa fil

@@ -1,6 +1,6 @@
*** Settings ***
Suite Setup Fuzzy Setup Plain Siphash
Suite Teardown Fuzzy Teardown
Suite Teardown Rspamd Redis Teardown
Resource lib.robot

*** Test Cases ***

+ 20
- 29
test/functional/cases/120_fuzzy/lib.robot Visa fil

@@ -5,25 +5,24 @@ Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
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
@@ -96,7 +95,7 @@ Fuzzy Setup Encrypted
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}
@@ -106,23 +105,19 @@ Fuzzy Setup Encrypted Keyed

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
@@ -180,7 +175,3 @@ Fuzzy Multimessage Overwrite Test
FOR ${i} IN @{MESSAGES}
Fuzzy Overwrite Test ${i}
END

Fuzzy Teardown
Normal Teardown
Shutdown Process With Children ${REDIS_PID}

+ 1
- 1
test/functional/cases/120_fuzzy/mumhash-keyed.robot Visa fil

@@ -1,6 +1,6 @@
*** Settings ***
Suite Setup Fuzzy Setup Keyed Mumhash
Suite Teardown Fuzzy Teardown
Suite Teardown Rspamd Redis Teardown
Resource lib.robot

*** Test Cases ***

+ 1
- 1
test/functional/cases/120_fuzzy/mumhash.robot Visa fil

@@ -1,6 +1,6 @@
*** Settings ***
Suite Setup Fuzzy Setup Plain Mumhash
Suite Teardown Fuzzy Teardown
Suite Teardown Rspamd Redis Teardown
Resource lib.robot

*** Test Cases ***

+ 1
- 1
test/functional/cases/120_fuzzy/siphash-keyed.robot Visa fil

@@ -1,6 +1,6 @@
*** Settings ***
Suite Setup Fuzzy Setup Keyed Siphash
Suite Teardown Fuzzy Teardown
Suite Teardown Rspamd Redis Teardown
Resource lib.robot

*** Test Cases ***

+ 1
- 1
test/functional/cases/120_fuzzy/siphash.robot Visa fil

@@ -1,6 +1,6 @@
*** Settings ***
Suite Setup Fuzzy Setup Plain Siphash
Suite Teardown Fuzzy Teardown
Suite Teardown Rspamd Redis Teardown
Resource lib.robot

*** Test Cases ***

+ 1
- 1
test/functional/cases/120_fuzzy/xxhash-keyed.robot Visa fil

@@ -1,6 +1,6 @@
*** Settings ***
Suite Setup Fuzzy Setup Keyed Xxhash
Suite Teardown Fuzzy Teardown
Suite Teardown Rspamd Redis Teardown
Resource lib.robot

*** Test Cases ***

+ 1
- 1
test/functional/cases/120_fuzzy/xxhash.robot Visa fil

@@ -1,6 +1,6 @@
*** Settings ***
Suite Setup Fuzzy Setup Plain Xxhash
Suite Teardown Fuzzy Teardown
Suite Teardown Rspamd Redis Teardown
Resource lib.robot

*** Test Cases ***

+ 6
- 6
test/functional/cases/121_json/100_preresult.robot Visa fil

@@ -1,16 +1,16 @@
*** 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

+ 6
- 6
test/functional/cases/121_json/101_simple.robot Visa fil

@@ -1,16 +1,16 @@
*** 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

+ 0
- 3
test/functional/cases/121_json/lib.robot Visa fil

@@ -2,9 +2,6 @@
${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]

+ 10
- 16
test/functional/cases/123_whitelist.robot Visa fil

@@ -1,22 +1,20 @@
*** 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
@@ -76,7 +74,3 @@ VALID SPF and NO DKIM
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

+ 5
- 5
test/functional/cases/125_map_reload.robot Visa fil

@@ -6,10 +6,10 @@ Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
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 ***
@@ -39,9 +39,9 @@ Map Reload Setup
${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

+ 8
- 8
test/functional/cases/131_dkim_signing/001_simple.robot Visa fil

@@ -1,17 +1,17 @@
*** 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

+ 7
- 8
test/functional/cases/131_dkim_signing/002_redis.robot Visa fil

@@ -1,16 +1,16 @@
*** 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
@@ -25,8 +25,7 @@ TEST NOT SIGNED - USERNAME WRONG DOMAIN

*** 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

+ 8
- 8
test/functional/cases/131_dkim_signing/003_eddsa.robot Visa fil

@@ -1,17 +1,17 @@
*** 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

+ 7
- 7
test/functional/cases/131_dkim_signing/004_invalidate_key.robot Visa fil

@@ -7,11 +7,11 @@ Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
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
@@ -36,7 +36,7 @@ Key Invalidation Setup
${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
@@ -47,4 +47,4 @@ Move Key

Key Invalidation Teardown
Cleanup Temporary Directory ${RSPAMD_KEY_DIR}
Normal Teardown
Rspamd Teardown

+ 8
- 8
test/functional/cases/131_dkim_signing/005_multiple.robot Visa fil

@@ -1,17 +1,17 @@
*** 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

+ 5
- 5
test/functional/cases/131_dkim_signing/006_milter.robot Visa fil

@@ -1,15 +1,15 @@
*** 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

+ 8
- 8
test/functional/cases/131_dkim_signing/007_sign_maps.robot Visa fil

@@ -1,17 +1,17 @@
*** 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

+ 5
- 5
test/functional/cases/135_spamassassin.robot Visa fil

@@ -1,14 +1,14 @@
*** 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

+ 8
- 8
test/functional/cases/140_proxy.robot Visa fil

@@ -6,10 +6,10 @@ Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
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
@@ -29,13 +29,13 @@ RSPAMC Legacy 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}

@@ -43,8 +43,8 @@ Proxy Teardown
# 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

+ 4
- 7
test/functional/cases/151_rspamadm_async.robot Visa fil

@@ -8,10 +8,9 @@ Variables ${RSPAMD_TESTDIR}/lib/vars.py
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
@@ -39,8 +38,6 @@ DNS client
*** Keywords ***

Rspamadm test Setup
${tmpdir} = Make Temporary Directory
Set Suite Variable ${RSPAMD_TMPDIR} ${tmpdir}
Run Dummy Http
Run Redis

@@ -63,4 +60,4 @@ Prepare temp directory
${config} = Replace Variables ${config}
Log ${config}
Create File ${tmpdir}/rspamd.conf ${config}
[Return] ${tmpdir}
[Return] ${tmpdir}

+ 8
- 13
test/functional/cases/160_antivirus.robot Visa fil

@@ -1,5 +1,5 @@
*** Settings ***
Suite Setup Antivirus Setup
Suite Setup Rspamd Redis Setup
Suite Teardown Antivirus Teardown
Library Process
Library ${RSPAMD_TESTDIR}/lib/rspamd.py
@@ -7,12 +7,12 @@ Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
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
@@ -94,13 +94,8 @@ AVAST CACHE 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

+ 8
- 9
test/functional/cases/161_p0f.robot Visa fil

@@ -7,12 +7,12 @@ Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
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
@@ -80,11 +80,10 @@ p0f BAD RESPONSE

*** Keywords ***
p0f Setup
New Setup
Run Redis
Rspamd Redis Setup

p0f Teardown
Normal Teardown
Rspamd Redis Teardown
Shutdown p0f
Terminate All Processes kill=True


+ 8
- 12
test/functional/cases/162_url_redirector.robot Visa fil

@@ -7,12 +7,12 @@ Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
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
@@ -26,15 +26,11 @@ RESOLVE URLS CACHED

*** 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


+ 5
- 8
test/functional/cases/180_milter.robot Visa fil

@@ -1,15 +1,15 @@
*** 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
@@ -28,9 +28,6 @@ COMBINED TEST
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}

+ 1
- 1
test/functional/cases/210_clickhouse/001_migration.robot Visa fil

@@ -73,7 +73,7 @@ Clickhosue Teardown
${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}

+ 6
- 6
test/functional/cases/220_http.robot Visa fil

@@ -7,11 +7,11 @@ 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/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
@@ -43,14 +43,14 @@ SSL Large 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

+ 7
- 7
test/functional/cases/230_tcp.robot Visa fil

@@ -7,11 +7,11 @@ Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
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
@@ -47,14 +47,14 @@ Sync API TCP post 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]

+ 6
- 6
test/functional/cases/231_tcp_down.robot Visa fil

@@ -1,17 +1,17 @@
*** 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 ***


+ 7
- 12
test/functional/cases/240_redis.robot Visa fil

@@ -1,6 +1,6 @@
*** 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
@@ -9,12 +9,12 @@ Suite Teardown Terminate All Processes kill=True


*** 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 ***
@@ -24,8 +24,3 @@ Redis client
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

+ 7
- 7
test/functional/cases/241_redis_is_dead.robot Visa fil

@@ -1,8 +1,8 @@
*** 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
@@ -11,12 +11,12 @@ Suite Teardown Terminate All Processes kill=True


*** 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 ***

+ 6
- 6
test/functional/cases/250_dns.robot Visa fil

@@ -1,17 +1,17 @@
*** 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

+ 7
- 7
test/functional/cases/260_regex.robot Visa fil

@@ -1,16 +1,16 @@
*** 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 ***

+ 7
- 14
test/functional/cases/270_selector.robot Visa fil

@@ -1,16 +1,16 @@
*** 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 ***
@@ -19,10 +19,3 @@ Newlines
Expect Symbol CONFIG_SELECTOR_RE_RCPT_SUBJECT
Expect Symbol LUA_SELECTOR_RE


*** Keywords ***
Regex Setup
New Setup

Regex Teardown
Normal Teardown

+ 14
- 21
test/functional/cases/280_rules.robot Visa fil

@@ -1,23 +1,23 @@
*** 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 ***
@@ -114,10 +114,3 @@ REPLYTO_ADDR_EQ_FROM
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

+ 6
- 6
test/functional/cases/281_fnames.robot Visa fil

@@ -1,15 +1,15 @@
*** 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 ***

+ 7
- 17
test/functional/cases/290_greylist.robot Visa fil

@@ -1,16 +1,16 @@
*** 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
@@ -25,13 +25,3 @@ GREYLIST PASS
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

+ 6
- 14
test/functional/cases/300_rbl.robot Visa fil

@@ -1,15 +1,15 @@
*** 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
@@ -68,11 +68,3 @@ SELECTORS COMBINED
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

+ 6
- 6
test/functional/cases/310_udp.robot Visa fil

@@ -7,11 +7,11 @@ 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/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
@@ -29,12 +29,12 @@ Errored 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]

+ 8
- 8
test/functional/cases/320_arc_signing/001_simple.robot Visa fil

@@ -1,17 +1,17 @@
*** 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

+ 7
- 8
test/functional/cases/320_arc_signing/002_redis.robot Visa fil

@@ -1,16 +1,16 @@
*** 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
@@ -23,8 +23,7 @@ TEST NOT SIGNED - USERNAME WRONG DOMAIN

*** 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

+ 5
- 9
test/functional/cases/321_arc_check.robot Visa fil

@@ -1,14 +1,14 @@
*** 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
@@ -19,7 +19,3 @@ ARC BAD CHECK
Scan File ${RSPAMD_TESTDIR}/messages/arcbad.eml
Expect Symbol ARC_INVALID


*** Keywords ***
ARC Setup
New Setup

+ 7
- 12
test/functional/cases/330_neural/001_autotrain.robot Visa fil

@@ -1,17 +1,17 @@
*** 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
@@ -61,8 +61,3 @@ Check Neural SPAM INVERSE
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

+ 7
- 12
test/functional/cases/330_neural/002_manualtrain.robot Visa fil

@@ -1,17 +1,17 @@
*** 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
@@ -62,8 +62,3 @@ Check Neural SPAM - inverse
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

+ 5
- 13
test/functional/cases/340_surbl.robot Visa fil

@@ -1,14 +1,14 @@
*** 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
@@ -160,11 +160,3 @@ SURBL url compose map 2
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

+ 6
- 10
test/functional/cases/350_magic.robot Visa fil

@@ -1,15 +1,15 @@
*** 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
@@ -69,7 +69,3 @@ Magic detections bundle 1
... MAGIC_SYM_BAT_54
... MAGIC_SYM_ICS_55
... MAGIC_SYM_VCF_56

*** Keywords ***
Magic Setup
New Setup

+ 6
- 14
test/functional/cases/360_force_actions.robot Visa fil

@@ -1,15 +1,15 @@
*** 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
@@ -42,11 +42,3 @@ FORCE ACTIONS from add header to reject
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

+ 0
- 12
test/functional/configs/fuzzy_master_worker.conf Visa fil

@@ -1,12 +0,0 @@
sync_keypair {
pubkey = "kmtnjffjzq9bq8qe14ii4gb4e1ihuq84ubfibe79ba85ob5nr3my";
privkey = "ea6etw8a47e66ypc38mmdnrwskx7nj86gqydwo7jrmfsxeryny1y";
id = "6jxoadfy8gr6dq1nyafoa5ym3391sioz3fbbq5qug7g9dchmgjr4w4kxjzqkkc9rzd7eftngyzwau9ooqe9g96bxiwq6c3xo8965gud";
encoding = "base32";
algorithm = "curve25519";
}
slave {
name = "slave1";
hosts = "${RSPAMD_LOCAL_ADDR}:${PORT_FUZZY_SLAVE}";
key = "caen11q4eczdqgsb8u55zmmoh4z5qxd61y1rph7pz1fcubmfccdy";
}

+ 0
- 11
test/functional/configs/fuzzy_slave_worker.conf Visa fil

@@ -1,11 +0,0 @@
sync_keypair {
pubkey = "caen11q4eczdqgsb8u55zmmoh4z5qxd61y1rph7pz1fcubmfccdy";
privkey = "oi4k9g9prsqmk19xio7itaobmbz7yonktren1j5qwni1t88mwfty";
id = "qdwzxmoxpno4ge68ba1ai35n65q7mrqdp8dpp33h8haxy61omt881mep4944w1n6izuk64ktypqymrq55zkx3qob1ayfz9hxjtxbmxb";
encoding = "base32";
algorithm = "curve25519";
type = "kex";
}

masters = "${RSPAMD_LOCAL_ADDR}";
master_key = "kmtnjffjzq9bq8qe14ii4gb4e1ihuq84ubfibe79ba85ob5nr3my";

+ 0
- 41
test/functional/configs/pluginsplus.conf Visa fil

@@ -1,41 +0,0 @@
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}

+ 55
- 64
test/functional/lib/rspamd.robot Visa fil

@@ -56,10 +56,6 @@ Do Not Expect Symbols
... 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}
@@ -156,42 +152,10 @@ Export Scoped Variables
... 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}
@@ -208,6 +172,39 @@ Redis SET
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
@@ -226,32 +223,6 @@ Run Redis
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
@@ -284,8 +255,28 @@ New Run Rspamd
${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}

Laddar…
Avbryt
Spara