summaryrefslogtreecommitdiffstats
path: root/test/functional/cases/130_dkim.robot
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2016-08-02 19:22:53 +0100
committerAndrew Lewis <nerf@judo.za.org>2016-08-02 21:16:56 +0100
commitb76827ebc16be81e907cc46732cc8f3d7a29282b (patch)
treec486e8fbf1b7cae46a8c820bc527955f9f6d31ce /test/functional/cases/130_dkim.robot
parent0ef106e8a3a39c3dbd8e2cc5f24fff7e0e23ac40 (diff)
downloadrspamd-b76827ebc16be81e907cc46732cc8f3d7a29282b.tar.gz
rspamd-b76827ebc16be81e907cc46732cc8f3d7a29282b.zip
[Test] Add DKIM sign + verify tests
Diffstat (limited to 'test/functional/cases/130_dkim.robot')
-rw-r--r--test/functional/cases/130_dkim.robot24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/functional/cases/130_dkim.robot b/test/functional/cases/130_dkim.robot
new file mode 100644
index 000000000..88ce5eb28
--- /dev/null
+++ b/test/functional/cases/130_dkim.robot
@@ -0,0 +1,24 @@
+*** Settings ***
+Suite Setup Generic Setup
+Suite Teardown Generic Teardown
+Library ${TESTDIR}/lib/rspamd.py
+Resource ${TESTDIR}/lib/rspamd.robot
+Variables ${TESTDIR}/lib/vars.py
+
+*** Variables ***
+${CONFIG} ${TESTDIR}/configs/dkim.conf
+${RSPAMD_SCOPE} Suite
+
+*** Test Cases ***
+DKIM Sign
+ Set Suite Variable ${RAN_SIGNTEST} 0
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/spam_message.eml --mime --header=dodkim=1
+ Check Rspamc ${result} DKIM-Signature
+ Set Suite Variable ${SIGNED_MESSAGE} ${TMPDIR}/dkim_sign_test.eml
+ Create File ${SIGNED_MESSAGE} ${result.stdout}
+ Set Suite Variable ${RAN_SIGNTEST} 1
+
+DKIM Self Verify
+ Run Keyword If ${RAN_SIGNTEST} == 0 Fail "Sign test was not run"
+ ${result} = Scan Message With Rspamc ${SIGNED_MESSAGE}
+ Check Rspamc ${result} R_DKIM_ALLOW