You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

280_rules.robot 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. *** Settings ***
  2. Test Setup Rules Setup
  3. Test Teardown Rules Teardown
  4. Library ${TESTDIR}/lib/rspamd.py
  5. Resource ${TESTDIR}/lib/rspamd.robot
  6. Variables ${TESTDIR}/lib/vars.py
  7. *** Variables ***
  8. ${CONFIG} ${TESTDIR}/configs/plugins.conf
  9. ${MESSAGE} ${TESTDIR}/messages/newlines.eml
  10. ${MESSAGE1} ${TESTDIR}/messages/fws_fn.eml
  11. ${MESSAGE2} ${TESTDIR}/messages/fws_fp.eml
  12. ${MESSAGE3} ${TESTDIR}/messages/fws_tp.eml
  13. ${MESSAGE4} ${TESTDIR}/messages/broken_richtext.eml
  14. ${URL_TLD} ${TESTDIR}/../lua/unit/test_tld.dat
  15. ${RSPAMD_SCOPE} Test
  16. *** Test Cases ***
  17. Broken MIME
  18. ${result} = Scan Message With Rspamc ${MESSAGE3}
  19. Check Rspamc ${result} MISSING_SUBJECT
  20. Issue 2584
  21. ${result} = Scan Message With Rspamc ${MESSAGE1}
  22. Check Rspamc ${result} BROKEN_CONTENT_TYPE inverse=1
  23. Should Not Contain ${result.stdout} MISSING_SUBJECT
  24. Should Not Contain ${result.stdout} R_MISSING_CHARSET
  25. Issue 2349
  26. ${result} = Scan Message With Rspamc ${MESSAGE2}
  27. Check Rspamc ${result} MULTIPLE_UNIQUE_HEADERS inverse=1
  28. Broken Rich Text
  29. ${result} = Scan Message With Rspamc ${MESSAGE4}
  30. Check Rspamc ${result} BROKEN_CONTENT_TYPE
  31. Dynamic Config
  32. ${result} = Scan Message With Rspamc ${MESSAGE}
  33. Check Rspamc ${result} SA_BODY_WORD (10
  34. Check Rspamc ${result} \/ 20
  35. *** Keywords ***
  36. Rules Setup
  37. ${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/regexp.conf
  38. Set Suite Variable ${PLUGIN_CONFIG}
  39. Generic Setup PLUGIN_CONFIG
  40. Rules Teardown
  41. Normal Teardown