diff options
author | Andrew Lewis <nerf@judo.za.org> | 2016-08-04 14:39:19 +0100 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2016-08-04 14:39:19 +0100 |
commit | 12ff0dfbb6c1882b454ac201040bb30f78d04ad3 (patch) | |
tree | 7303319568fe9989ab9ec87ee9591fa7a1f0c251 /test/functional/cases | |
parent | f022a45ae3124e642b584e12623f7a0b4882df6e (diff) | |
download | rspamd-12ff0dfbb6c1882b454ac201040bb30f78d04ad3.tar.gz rspamd-12ff0dfbb6c1882b454ac201040bb30f78d04ad3.zip |
[Test] Beginnings of tests for SpamAssassin plugin
Diffstat (limited to 'test/functional/cases')
-rw-r--r-- | test/functional/cases/135_spamassassin.robot | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/functional/cases/135_spamassassin.robot b/test/functional/cases/135_spamassassin.robot new file mode 100644 index 000000000..31082c96d --- /dev/null +++ b/test/functional/cases/135_spamassassin.robot @@ -0,0 +1,33 @@ +*** Settings *** +Suite Setup SpamAssassin Setup +Suite Teardown Generic Teardown +Library ${TESTDIR}/lib/rspamd.py +Resource ${TESTDIR}/lib/rspamd.robot +Variables ${TESTDIR}/lib/vars.py + +*** Variables *** +${CONFIG} ${TESTDIR}/configs/plugins.conf +${RSPAMD_SCOPE} Suite + +*** Test Cases *** +Freemail Scan + Set Suite Variable ${FREEMAIL_RESULT} ${EMPTY} + ${FREEMAIL_RESULT} = Scan Message With Rspamc ${TESTDIR}/messages/freemail.eml + ... --from faked.asdfjisiwosp372@outlook.com + Check Rspamc ${FREEMAIL_RESULT} ${EMPTY} + Set Suite Variable ${FREEMAIL_RESULT} ${FREEMAIL_RESULT.stdout} + +Freemail From + Should Contain ${FREEMAIL_RESULT} FREEMAIL_FROM + +Freemail From Enddigit + Should Contain ${FREEMAIL_RESULT} FREEMAIL_ENVFROM_END_DIGIT + +Freemail Subject + Should Contain ${FREEMAIL_RESULT} FREEMAIL_SUBJECT + +*** Keywords *** +SpamAssassin Setup + ${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/spamassassin.conf + Set Suite Variable ${PLUGIN_CONFIG} + Generic Setup PLUGIN_CONFIG |