aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional/cases/131_dkim_signing
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2021-05-04 13:48:37 +0200
committerAndrew Lewis <nerf@judo.za.org>2021-05-04 13:48:37 +0200
commitdb4da2c22d159d1a6450b9447ad90e1795e5c535 (patch)
treee2c05c4e4d0668e02a7a5e2b279c5d76d1403b90 /test/functional/cases/131_dkim_signing
parent6244d64b43baa240d63528849a7a47b3f32eccc3 (diff)
downloadrspamd-db4da2c22d159d1a6450b9447ad90e1795e5c535.tar.gz
rspamd-db4da2c22d159d1a6450b9447ad90e1795e5c535.zip
[Test] Use lupa for templating rspamd configs
Diffstat (limited to 'test/functional/cases/131_dkim_signing')
-rw-r--r--test/functional/cases/131_dkim_signing/001_simple.robot15
-rw-r--r--test/functional/cases/131_dkim_signing/002_redis.robot12
-rw-r--r--test/functional/cases/131_dkim_signing/003_eddsa.robot15
-rw-r--r--test/functional/cases/131_dkim_signing/004_invalidate_key.robot6
-rw-r--r--test/functional/cases/131_dkim_signing/005_multiple.robot15
-rw-r--r--test/functional/cases/131_dkim_signing/006_milter.robot8
-rw-r--r--test/functional/cases/131_dkim_signing/007_sign_maps.robot15
7 files changed, 20 insertions, 66 deletions
diff --git a/test/functional/cases/131_dkim_signing/001_simple.robot b/test/functional/cases/131_dkim_signing/001_simple.robot
index 2bcd53f36..6185ec2e4 100644
--- a/test/functional/cases/131_dkim_signing/001_simple.robot
+++ b/test/functional/cases/131_dkim_signing/001_simple.robot
@@ -1,12 +1,12 @@
*** Settings ***
-Suite Setup DKIM Signing Setup
-Suite Teardown DKIM Signing Teardown
+Suite Setup New Setup
+Suite Teardown Normal Teardown
Library ${TESTDIR}/lib/rspamd.py
Resource ${TESTDIR}/lib/rspamd.robot
Variables ${TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${TESTDIR}/configs/plugins.conf
+${CONFIG} ${TESTDIR}/configs/dkim_signing/simple.conf
${MESSAGE} ${TESTDIR}/messages/dmarc/fail_none.eml
${MESSAGE_FAIL} ${TESTDIR}/messages/dmarc/fail_none1.eml
${REDIS_SCOPE} Suite
@@ -33,12 +33,3 @@ TEST NOT SIGNED - USERNAME WRONG PUBKEY
${result} = Scan Message With Rspamc ${MESSAGE_FAIL} -u bob@invalid.za.org
Check Rspamc ${result} DKIM-Signature: inverse=1
Should Not Contain ${result.stdout} DKIM_SIGNED
-
-*** Keywords ***
-DKIM Signing Setup
- ${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/dkim_signing/simple.conf
- Set Suite Variable ${PLUGIN_CONFIG}
- Generic Setup PLUGIN_CONFIG
-
-DKIM Signing Teardown
- Normal Teardown
diff --git a/test/functional/cases/131_dkim_signing/002_redis.robot b/test/functional/cases/131_dkim_signing/002_redis.robot
index e87749a0a..45611c2bc 100644
--- a/test/functional/cases/131_dkim_signing/002_redis.robot
+++ b/test/functional/cases/131_dkim_signing/002_redis.robot
@@ -1,12 +1,12 @@
*** Settings ***
Suite Setup DKIM Signing Setup
-Suite Teardown DKIM Signing Teardown
+Suite Teardown Normal Teardown
Library ${TESTDIR}/lib/rspamd.py
Resource ${TESTDIR}/lib/rspamd.robot
Variables ${TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${TESTDIR}/configs/plugins.conf
+${CONFIG} ${TESTDIR}/configs/dkim_signing/redis.conf
${MESSAGE} ${TESTDIR}/messages/dmarc/fail_none.eml
${REDIS_SCOPE} Suite
${RSPAMD_SCOPE} Suite
@@ -25,14 +25,8 @@ TEST NOT SIGNED - USERNAME WRONG DOMAIN
*** Keywords ***
DKIM Signing Setup
- ${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/dkim_signing/redis.conf
- Set Suite Variable ${PLUGIN_CONFIG}
- Generic Setup PLUGIN_CONFIG
Run Redis
Redis HSET TEST_DKIM_SELECTORS cacophony.za.org dkim
${key} = Get File ${TESTDIR}/configs/dkim.key
Redis HSET TEST_DKIM_KEYS dkim.cacophony.za.org ${key}
-
-DKIM Signing Teardown
- Normal Teardown
- Shutdown Process With Children ${REDIS_PID}
+ New Setup
diff --git a/test/functional/cases/131_dkim_signing/003_eddsa.robot b/test/functional/cases/131_dkim_signing/003_eddsa.robot
index ea2fe03be..37c01893d 100644
--- a/test/functional/cases/131_dkim_signing/003_eddsa.robot
+++ b/test/functional/cases/131_dkim_signing/003_eddsa.robot
@@ -1,12 +1,12 @@
*** Settings ***
-Suite Setup DKIM Signing Setup
-Suite Teardown DKIM Signing Teardown
+Suite Setup New Setup
+Suite Teardown Normal Teardown
Library ${TESTDIR}/lib/rspamd.py
Resource ${TESTDIR}/lib/rspamd.robot
Variables ${TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${TESTDIR}/configs/plugins.conf
+${CONFIG} ${TESTDIR}/configs/dkim_signing/eddsa.conf
${MESSAGE} ${TESTDIR}/messages/dmarc/fail_none.eml
${MESSAGE_FAIL} ${TESTDIR}/messages/dmarc/fail_none1.eml
${REDIS_SCOPE} Suite
@@ -28,12 +28,3 @@ TEST NOT SIGNED - USERNAME WRONG PUBKEY
${result} = Scan Message With Rspamc ${MESSAGE_FAIL} -u bob@invalid.za.org
Check Rspamc ${result} DKIM-Signature: inverse=1
Should Not Contain ${result.stdout} DKIM_SIGNED
-
-*** Keywords ***
-DKIM Signing Setup
- ${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/dkim_signing/eddsa.conf
- Set Suite Variable ${PLUGIN_CONFIG}
- Generic Setup PLUGIN_CONFIG
-
-DKIM Signing Teardown
- Normal Teardown
diff --git a/test/functional/cases/131_dkim_signing/004_invalidate_key.robot b/test/functional/cases/131_dkim_signing/004_invalidate_key.robot
index 2cf34e305..812a77e00 100644
--- a/test/functional/cases/131_dkim_signing/004_invalidate_key.robot
+++ b/test/functional/cases/131_dkim_signing/004_invalidate_key.robot
@@ -7,7 +7,7 @@ Resource ${TESTDIR}/lib/rspamd.robot
Variables ${TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${TESTDIR}/configs/plugins.conf
+${CONFIG} ${TESTDIR}/configs/dkim_signing/invalidate.conf
${MESSAGE} ${TESTDIR}/messages/dmarc/fail_none.eml
${REDIS_SCOPE} Suite
${RSPAMD_SCOPE} Suite
@@ -36,9 +36,7 @@ Key Invalidation Setup
${key_dir} Make Temporary Directory
Set Suite Variable ${KEY_DIR} ${key_dir}
Copy File ${TESTDIR}/configs/dkim-eddsa.key ${KEY_DIR}/dkim-eddsa.key
- ${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/dkim_signing/invalidate.conf
- Set Suite Variable ${PLUGIN_CONFIG}
- Generic Setup PLUGIN_CONFIG
+ New Setup
Delete Key
Remove File ${KEY_DIR}/dkim-eddsa.key
diff --git a/test/functional/cases/131_dkim_signing/005_multiple.robot b/test/functional/cases/131_dkim_signing/005_multiple.robot
index 72222f460..2d35380a3 100644
--- a/test/functional/cases/131_dkim_signing/005_multiple.robot
+++ b/test/functional/cases/131_dkim_signing/005_multiple.robot
@@ -1,12 +1,12 @@
*** Settings ***
-Suite Setup DKIM Signing Setup
-Suite Teardown DKIM Signing Teardown
+Suite Setup New Setup
+Suite Teardown Normal Teardown
Library ${TESTDIR}/lib/rspamd.py
Resource ${TESTDIR}/lib/rspamd.robot
Variables ${TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${TESTDIR}/configs/plugins.conf
+${CONFIG} ${TESTDIR}/configs/dkim_signing/multiple.conf
${MESSAGE} ${TESTDIR}/messages/dmarc/fail_none.eml
${MESSAGE_FAIL} ${TESTDIR}/messages/dmarc/fail_none1.eml
${REDIS_SCOPE} Suite
@@ -18,12 +18,3 @@ 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/cases/131_dkim_signing/006_milter.robot b/test/functional/cases/131_dkim_signing/006_milter.robot
index cd48a62b7..9e327b116 100644
--- a/test/functional/cases/131_dkim_signing/006_milter.robot
+++ b/test/functional/cases/131_dkim_signing/006_milter.robot
@@ -1,5 +1,5 @@
*** Settings ***
-Suite Setup DKIM Milter Setup
+Suite Setup New Setup
Suite Teardown Generic Teardown
Library Process
Library ${TESTDIR}/lib/rspamd.py
@@ -7,8 +7,9 @@ Resource ${TESTDIR}/lib/rspamd.robot
Variables ${TESTDIR}/lib/vars.py
*** Variables ***
+${CONFIG} ${TESTDIR}/configs/dkim_signing/milter.conf
${RSPAMD_SCOPE} Suite
-${URL_TLD} ${TESTDIR}/../lua/unit/test_tld.dat
+${URL_TLD} ${TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
SINGLE SIGNATURE
@@ -18,9 +19,6 @@ MULTIPLE SIGNATURES
Milter Test dkim_many.lua
*** Keywords ***
-DKIM Milter Setup
- Generic Setup CONFIG=${TESTDIR}/configs/dkim_signing/milter.conf
-
Milter Test
[Arguments] ${mtlua}
${result} = Run Process miltertest -Dport\=${PORT_PROXY} -Dhost\=${LOCAL_ADDR} -s ${TESTDIR}/lua/miltertest/${mtlua}
diff --git a/test/functional/cases/131_dkim_signing/007_sign_maps.robot b/test/functional/cases/131_dkim_signing/007_sign_maps.robot
index 69d4c9a92..13dfb077e 100644
--- a/test/functional/cases/131_dkim_signing/007_sign_maps.robot
+++ b/test/functional/cases/131_dkim_signing/007_sign_maps.robot
@@ -1,12 +1,12 @@
*** Settings ***
-Suite Setup DKIM Signing Setup
-Suite Teardown DKIM Signing Teardown
+Suite Setup New Setup
+Suite Teardown Normal Teardown
Library ${TESTDIR}/lib/rspamd.py
Resource ${TESTDIR}/lib/rspamd.robot
Variables ${TESTDIR}/lib/vars.py
*** Variables ***
-${CONFIG} ${TESTDIR}/configs/plugins.conf
+${CONFIG} ${TESTDIR}/configs/dkim_signing/sign_maps.conf
${MESSAGE} ${TESTDIR}/messages/dmarc/fail_none.eml
${MESSAGE_FAIL} ${TESTDIR}/messages/dmarc/fail_none1.eml
${REDIS_SCOPE} Suite
@@ -23,12 +23,3 @@ TEST NOT SIGNED - FROM WRONG DOMAIN
${result} = Scan Message With Rspamc ${MESSAGE_FAIL} -u bob@cacophony.za.org
Check Rspamc ${result} DKIM-Signature: inverse=1
Should Not Contain ${result.stdout} DKIM_SIGNED
-
-*** Keywords ***
-DKIM Signing Setup
- ${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/dkim_signing/sign_maps.conf
- Set Suite Variable ${PLUGIN_CONFIG}
- Generic Setup PLUGIN_CONFIG
-
-DKIM Signing Teardown
- Normal Teardown