aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional/lib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-03-15 14:02:30 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2024-03-15 14:02:30 +0000
commitfa4d299b3eeefd669d8e50f6ebb905fe251743cc (patch)
tree64bd980b76d43b12c1f68adc553509c11116f465 /test/functional/lib
parent06838bfcc8ec1c580f76192176bd47dd4d03b65d (diff)
downloadrspamd-fa4d299b3eeefd669d8e50f6ebb905fe251743cc.tar.gz
rspamd-fa4d299b3eeefd669d8e50f6ebb905fe251743cc.zip
[Test] More rework of the tests
Diffstat (limited to 'test/functional/lib')
-rw-r--r--test/functional/lib/rspamd.robot16
-rw-r--r--test/functional/lib/vars.py49
2 files changed, 17 insertions, 48 deletions
diff --git a/test/functional/lib/rspamd.robot b/test/functional/lib/rspamd.robot
index a5f897365..f9614c6fa 100644
--- a/test/functional/lib/rspamd.robot
+++ b/test/functional/lib/rspamd.robot
@@ -289,6 +289,7 @@ Run Rspamd
... --var\=DBDIR\=${RSPAMD_TMPDIR}
... --var\=LOCAL_CONFDIR\=/non-existent
... --var\=CONFDIR\=${RSPAMD_TESTDIR}/../../conf/
+ ... --insecure
... env:RSPAMD_LOCAL_CONFDIR=/non-existent
... env:RSPAMD_TMPDIR=${RSPAMD_TMPDIR}
... env:RSPAMD_CONFDIR=${RSPAMD_TESTDIR}/../../conf/
@@ -302,6 +303,21 @@ Run Rspamd
# Confirm worker is reachable
Wait Until Keyword Succeeds 15x 1 sec Ping Rspamd ${RSPAMD_LOCAL_ADDR} ${check_port}
+Rspamadm Setup
+ ${RSPAMADM_TMPDIR} = Make Temporary Directory
+ Set Suite Variable ${RSPAMADM_TMPDIR}
+
+Rspamadm Teardown
+ Cleanup Temporary Directory ${RSPAMADM_TMPDIR}
+
+Rspamadm
+ [Arguments] @{args}
+ ${result} = Run Process ${RSPAMADM}
+ ... --var\=TMPDIR\=${RSPAMADM_TMPDIR}
+ ... --var\=DBDIR\=${RSPAMADM_TMPDIR}
+ ... --var\=LOCAL_CONFDIR\=/nonexistent
+ ... @{args}
+ [Return] ${result}
Run Nginx
${template} = Get File ${RSPAMD_TESTDIR}/configs/nginx.conf
diff --git a/test/functional/lib/vars.py b/test/functional/lib/vars.py
index a4bcbadda..bee2e92d4 100644
--- a/test/functional/lib/vars.py
+++ b/test/functional/lib/vars.py
@@ -11,54 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+
import shutil
import socket