aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-11-18 12:20:40 +0000
committerGitHub <noreply@github.com>2023-11-18 12:20:40 +0000
commit32ae9363987acc99b3b7812211ab754433d3da49 (patch)
tree1b8eb09ec9764cd24f8cfe5d78bb3c12859c9506 /test
parentf3c299ded9fa25e1c5c60c596515e99c386d5d55 (diff)
parent2f0b0d09b3878b98c98585978c34b73cab0c9b3a (diff)
downloadrspamd-32ae9363987acc99b3b7812211ab754433d3da49.tar.gz
rspamd-32ae9363987acc99b3b7812211ab754433d3da49.zip
Merge pull request #4709 from fatalbanana/demiltertest
[Test] Skip miltertest tests if it is not installed
Diffstat (limited to 'test')
-rw-r--r--test/functional/cases/131_dkim_signing/006_milter.robot2
-rw-r--r--test/functional/cases/180_milter.robot2
-rw-r--r--test/functional/lib/vars.py2
3 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/cases/131_dkim_signing/006_milter.robot b/test/functional/cases/131_dkim_signing/006_milter.robot
index cfa1bafce..2b63d07c7 100644
--- a/test/functional/cases/131_dkim_signing/006_milter.robot
+++ b/test/functional/cases/131_dkim_signing/006_milter.robot
@@ -1,6 +1,7 @@
*** Settings ***
Suite Setup Rspamd Setup
Suite Teardown Rspamd Teardown
+Test Tags miltertest
Library Process
Library ${RSPAMD_TESTDIR}/lib/rspamd.py
Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
@@ -21,6 +22,7 @@ MULTIPLE SIGNATURES
*** Keywords ***
Milter Test
[Arguments] ${mtlua}
+ Skip If not ${HAVE_MILTERTEST} msg=miltertest not installed
${result} = Run Process miltertest -Dport\=${RSPAMD_PORT_PROXY} -Dhost\=${RSPAMD_LOCAL_ADDR} -s ${RSPAMD_TESTDIR}/lua/miltertest/${mtlua}
... cwd=${RSPAMD_TESTDIR}/lua/miltertest
Should Match Regexp ${result.stderr} ^$
diff --git a/test/functional/cases/180_milter.robot b/test/functional/cases/180_milter.robot
index be9a06466..d41751c7a 100644
--- a/test/functional/cases/180_milter.robot
+++ b/test/functional/cases/180_milter.robot
@@ -1,6 +1,7 @@
*** Settings ***
Suite Setup Rspamd Setup
Suite Teardown Rspamd Teardown
+Test Tags miltertest
Library Process
Library ${RSPAMD_TESTDIR}/lib/rspamd.py
Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
@@ -30,6 +31,7 @@ COMBINED TEST
*** Keywords ***
Milter Test
[Arguments] ${mtlua}
+ Skip If not ${HAVE_MILTERTEST} msg=miltertest not installed
${result} = Run Process miltertest -Dport\=${RSPAMD_PORT_PROXY} -Dhost\=${RSPAMD_LOCAL_ADDR} -s ${RSPAMD_TESTDIR}/lua/miltertest/${mtlua}
... cwd=${RSPAMD_TESTDIR}/lua/miltertest
Should Match Regexp ${result.stderr} ^$
diff --git a/test/functional/lib/vars.py b/test/functional/lib/vars.py
index 898d21286..0a12a8191 100644
--- a/test/functional/lib/vars.py
+++ b/test/functional/lib/vars.py
@@ -1,6 +1,8 @@
+import shutil
import socket
CONTROLLER_ERRORS = True
+HAVE_MILTERTEST = shutil.which('miltertest') and True or False
RSPAMD_EXTERNAL_RELAY_ENABLED = False
RSPAMD_KEY_PVT1 = 'ekd3x36tfa5gd76t6pa8hqif3ott7n1siuux68exbkk7ukscte9y'
RSPAMD_KEY_PUB1 = 'm8kneubpcjsb8sbsoj7jy7azj9fdd3xmj63txni86a8ye9ncomny'