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.

290_greylist.robot 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. *** Settings ***
  2. Suite Setup Greylist Setup
  3. Suite Teardown Greylist 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/spam_message.eml
  10. ${REDIS_SCOPE} Suite
  11. ${RSPAMD_SCOPE} Suite
  12. ${URL_TLD} ${TESTDIR}/../lua/unit/test_tld.dat
  13. *** Test Cases ***
  14. GREYLIST NEW
  15. ${result} = Scan Message With Rspamc ${MESSAGE}
  16. Check Rspamc ${result} GREYLIST (0.00)[greylisted
  17. GREYLIST EARLY
  18. ${result} = Scan Message With Rspamc ${MESSAGE}
  19. Check Rspamc ${result} GREYLIST (0.00)[greylisted
  20. GREYLIST PASS
  21. Sleep 4s Wait greylisting timeout
  22. ${result} = Scan Message With Rspamc ${MESSAGE}
  23. Check Rspamc ${result} GREYLIST (0.00)[pass
  24. *** Keywords ***
  25. Greylist Setup
  26. ${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/greylist.conf
  27. Set Suite Variable ${PLUGIN_CONFIG}
  28. Generic Setup PLUGIN_CONFIG
  29. Run Redis
  30. Greylist Teardown
  31. Normal Teardown
  32. Shutdown Process With Children ${REDIS_PID}
  33. Terminate All Processes kill=True