aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJohn McKay <adenosine3p@gmail.com>2019-01-26 06:35:55 +0000
committerJohn McKay <adenosine3p@gmail.com>2019-02-02 05:41:41 +0000
commita92c5d43ef34b657bba4a2e201c3b11ded14e9e9 (patch)
tree7471bd2bdb3a208b1e7eb95aad22d39b9e04385a /test
parentbbabe7c61ca8403cf332fbfa6a0f23997f8cb92d (diff)
downloadrspamd-a92c5d43ef34b657bba4a2e201c3b11ded14e9e9.tar.gz
rspamd-a92c5d43ef34b657bba4a2e201c3b11ded14e9e9.zip
Add tests for multiple signatures
Diffstat (limited to 'test')
-rw-r--r--test/functional/cases/131_dkim_signing/005_multiple.robot29
-rw-r--r--test/functional/configs/dkim_signing/multiple.conf15
2 files changed, 44 insertions, 0 deletions
diff --git a/test/functional/cases/131_dkim_signing/005_multiple.robot b/test/functional/cases/131_dkim_signing/005_multiple.robot
new file mode 100644
index 000000000..4ab5c10a4
--- /dev/null
+++ b/test/functional/cases/131_dkim_signing/005_multiple.robot
@@ -0,0 +1,29 @@
+*** Settings ***
+Suite Setup DKIM Signing Setup
+Suite Teardown DKIM Signing Teardown
+Library ${TESTDIR}/lib/rspamd.py
+Resource ${TESTDIR}/lib/rspamd.robot
+Variables ${TESTDIR}/lib/vars.py
+
+*** Variables ***
+${CONFIG} ${TESTDIR}/configs/plugins.conf
+${MESSAGE} ${TESTDIR}/messages/dmarc/fail_none.eml
+${MESSAGE_FAIL} ${TESTDIR}/messages/dmarc/fail_none1.eml
+${REDIS_SCOPE} Suite
+${RSPAMD_SCOPE} Suite
+${URL_TLD} ${TESTDIR}/../lua/unit/test_tld.dat
+
+*** Test Cases ***
+TEST DOUBLE SIGNED
+ ${result} = Scan Message With Rspamc ${MESSAGE} -u bob@cacophony.za.org
+ Check Rspamc ${result} (?s:DKIM-Signature.+DKIM-Signature) re=1
+ Should Contain ${result.stdout} DKIM_SIGNED
+
+*** Keywords ***
+DKIM Signing Setup
+ ${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/dkim_signing/multiple.conf
+ Set Suite Variable ${PLUGIN_CONFIG}
+ Generic Setup PLUGIN_CONFIG
+
+DKIM Signing Teardown
+ Normal Teardown
diff --git a/test/functional/configs/dkim_signing/multiple.conf b/test/functional/configs/dkim_signing/multiple.conf
new file mode 100644
index 000000000..072842183
--- /dev/null
+++ b/test/functional/configs/dkim_signing/multiple.conf
@@ -0,0 +1,15 @@
+dkim_signing {
+ domain {
+ cacophony.za.org {
+ selectors = {
+ path: "${TESTDIR}/configs/dkim.key";
+ selector: "dkim";
+ }
+ selectors = {
+ path: "${TESTDIR}/configs/dkim-eddsa.key";
+ selector: "eddsa";
+ }
+ }
+ }
+ allow_pubkey_mismatch: false;
+}