aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2021-05-24 16:33:20 +0200
committerAndrew Lewis <nerf@judo.za.org>2021-06-01 15:59:19 +0200
commit89ecb1b26baa4a9d511d7fe6a50c8bc8414b5ed0 (patch)
tree0ac863007ae9356b28f11cc97afa9f098c0940e8 /test
parent9c12fd9609b1af6da35178987b9f1033b02757bc (diff)
downloadrspamd-89ecb1b26baa4a9d511d7fe6a50c8bc8414b5ed0.tar.gz
rspamd-89ecb1b26baa4a9d511d7fe6a50c8bc8414b5ed0.zip
[Test] Unmerge http / tcp tests
Diffstat (limited to 'test')
-rw-r--r--test/functional/cases/220_http.robot (renamed from test/functional/cases/001_merged/220_http.robot)8
-rw-r--r--test/functional/cases/230_tcp.robot (renamed from test/functional/cases/001_merged/230_tcp.robot)9
-rw-r--r--test/functional/cases/231_tcp_down.robot (renamed from test/functional/cases/001_merged/231_tcp_down.robot)9
-rw-r--r--test/functional/configs/merged-local.conf16
-rw-r--r--test/functional/configs/merged.conf6
5 files changed, 38 insertions, 10 deletions
diff --git a/test/functional/cases/001_merged/220_http.robot b/test/functional/cases/220_http.robot
index a6bf5ff65..2812b4efa 100644
--- a/test/functional/cases/001_merged/220_http.robot
+++ b/test/functional/cases/220_http.robot
@@ -7,7 +7,11 @@ Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/http.lua
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
Simple HTTP request
@@ -61,12 +65,14 @@ SSL Large HTTP request
Http Setup
Run Dummy Http
Run Dummy Https
+ Rspamd Setup
Http Teardown
${http_pid} = Get File /tmp/dummy_http.pid
Shutdown Process With Children ${http_pid}
${https_pid} = Get File /tmp/dummy_https.pid
Shutdown Process With Children ${https_pid}
+ Rspamd Teardown
Run Dummy Http
${result} = Start Process ${RSPAMD_TESTDIR}/util/dummy_http.py
diff --git a/test/functional/cases/001_merged/230_tcp.robot b/test/functional/cases/230_tcp.robot
index 89ec7ea5a..6c0c0a9c8 100644
--- a/test/functional/cases/001_merged/230_tcp.robot
+++ b/test/functional/cases/230_tcp.robot
@@ -7,8 +7,11 @@ Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
-
+${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/tcp.lua
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
Simple TCP request
@@ -48,12 +51,14 @@ Sync API TCP post request
Servers Setup
Run Dummy Http
Run Dummy Ssl
+ Rspamd Setup
Servers Teardown
${http_pid} = Get File /tmp/dummy_http.pid
Shutdown Process With Children ${http_pid}
${ssl_pid} = Get File /tmp/dummy_ssl.pid
Shutdown Process With Children ${ssl_pid}
+ Rspamd Teardown
Run Dummy Http
[Arguments]
diff --git a/test/functional/cases/001_merged/231_tcp_down.robot b/test/functional/cases/231_tcp_down.robot
index 088a60553..5d6c791bb 100644
--- a/test/functional/cases/001_merged/231_tcp_down.robot
+++ b/test/functional/cases/231_tcp_down.robot
@@ -1,10 +1,17 @@
*** Settings ***
+Suite Setup Rspamd Setup
+Suite Teardown Rspamd Teardown
Library ${RSPAMD_TESTDIR}/lib/rspamd.py
Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
-${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
+${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/tcp.lua
+${RSPAMD_SCOPE} Suite
+${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
+
*** Test Cases ***
Sync API TCP get request when server is down
diff --git a/test/functional/configs/merged-local.conf b/test/functional/configs/merged-local.conf
index 466003703..84bffe8dd 100644
--- a/test/functional/configs/merged-local.conf
+++ b/test/functional/configs/merged-local.conf
@@ -1,3 +1,19 @@
+history_redis {
+ enabled = false;
+}
+
+neural {
+ enabled = false;
+}
+
+bayes_expiry {
+ enabled = false;
+}
+
+metric_exporter {
+ enabled = false;
+}
+
emails {
"whitelist" = [
"rspamd-test.com"
diff --git a/test/functional/configs/merged.conf b/test/functional/configs/merged.conf
index 132461d90..8bec67a41 100644
--- a/test/functional/configs/merged.conf
+++ b/test/functional/configs/merged.conf
@@ -13,12 +13,6 @@ lua = "{= env.TESTDIR =}/lua/tlds.lua"
# 104_get_from
lua = "{= env.TESTDIR =}/lua/get_from.lua"
-# 220_http
-lua = "{= env.TESTDIR =}/lua/http.lua"
-
-# 230_tcp / 231_tcp_down
-lua = "{= env.TESTDIR =}/lua/tcp.lua"
-
# 240_redis
lua = "{= env.TESTDIR =}/lua/redis.lua"