]> source.dussan.org Git - rspamd.git/commitdiff
[Test] Avoid importing user configuration 3892/head
authorAndrew Lewis <nerf@judo.za.org>
Wed, 15 Sep 2021 11:31:44 +0000 (13:31 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Wed, 15 Sep 2021 11:31:44 +0000 (13:31 +0200)
test/functional/lib/rspamd.robot

index e7f2da1c7774d416522cad78cfb5bd33c7784ce0..36524dbe41a2dc423aedbfcac5122ad2b3b3bbfe 100644 (file)
@@ -3,6 +3,9 @@ Library         Collections
 Library         OperatingSystem
 Library         Process
 
+*** Variables ***
+${SET_LOCAL_CONFDIR}  --var=LOCAL_CONFDIR=/no/no/no/
+
 *** Keywords ***
 Check Controller Errors
   @{result} =  HTTP  GET  ${RSPAMD_LOCAL_ADDR}  ${RSPAMD_PORT_CONTROLLER}  /errors
@@ -226,7 +229,7 @@ Run Rspamd
   Export Rspamd Variables To Environment
 
   # Dump templated config or errors to log
-  ${result} =  Run Process  ${RSPAMADM}  configdump  -c  ${CONFIG}
+  ${result} =  Run Process  ${RSPAMADM}  ${SET_LOCAL_CONFDIR}  configdump  -c  ${CONFIG}
   # We need to send output to files (or discard output) to avoid hanging Robot
   ...  stdout=${RSPAMD_TMPDIR}/configdump.stdout  stderr=${RSPAMD_TMPDIR}/configdump.stderr
   ${configdump} =  Run Keyword If  ${result.rc} == 0  Get File  ${RSPAMD_TMPDIR}/configdump.stdout
@@ -237,7 +240,7 @@ Run Rspamd
   Set Directory Ownership  ${RSPAMD_TMPDIR}  ${RSPAMD_USER}  ${RSPAMD_GROUP}
 
   # Run Rspamd
-  ${result} =  Run Process  ${RSPAMD}  -u  ${RSPAMD_USER}  -g  ${RSPAMD_GROUP}
+  ${result} =  Run Process  ${RSPAMD}  ${SET_LOCAL_CONFDIR}  -u  ${RSPAMD_USER}  -g  ${RSPAMD_GROUP}
   ...  -c  ${CONFIG}  env:TMPDIR=${RSPAMD_TMPDIR}  env:DBDIR=${RSPAMD_TMPDIR}  env:LD_LIBRARY_PATH=${RSPAMD_TESTDIR}/../../contrib/aho-corasick
   # We need to send output to files (or discard output) to avoid hanging Robot
   ...  stdout=${RSPAMD_TMPDIR}/rspamd.stdout  stderr=${RSPAMD_TMPDIR}/rspamd.stderr