]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Test] Unmerge http / tcp tests 3768/head
authorAndrew Lewis <nerf@judo.za.org>
Mon, 24 May 2021 14:33:20 +0000 (16:33 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Tue, 1 Jun 2021 13:59:19 +0000 (15:59 +0200)
test/functional/cases/220_http.robot [moved from test/functional/cases/001_merged/220_http.robot with 90% similarity]
test/functional/cases/230_tcp.robot [moved from test/functional/cases/001_merged/230_tcp.robot with 88% similarity]
test/functional/cases/231_tcp_down.robot [moved from test/functional/cases/001_merged/231_tcp_down.robot with 71% similarity]
test/functional/configs/merged-local.conf
test/functional/configs/merged.conf

similarity index 90%
rename from test/functional/cases/001_merged/220_http.robot
rename to test/functional/cases/220_http.robot
index a6bf5ff650eb2eba30793a80f4ce4358bb5d7747..2812b4efa6e6f6e56fe1ad5bdb14568ae0ad6fce 100644 (file)
@@ -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
similarity index 88%
rename from test/functional/cases/001_merged/230_tcp.robot
rename to test/functional/cases/230_tcp.robot
index 89ec7ea5a97562b94dcab20c3d6a2c04150d0f80..6c0c0a9c8968a3b4c70248079f59e1193a3aede1 100644 (file)
@@ -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]
similarity index 71%
rename from test/functional/cases/001_merged/231_tcp_down.robot
rename to test/functional/cases/231_tcp_down.robot
index 088a605539f84eae7ffdfc53bae5d94dc7caa787..5d6c791bb250f04c19c7fac0b29ad812c98ca735 100644 (file)
@@ -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
index 466003703e1b011abb0bc8da33c861764df49170..84bffe8ddf5a55a5fc81c866db63d4ad26f898da 100644 (file)
@@ -1,3 +1,19 @@
+history_redis {
+  enabled = false;
+}
+
+neural {
+  enabled = false;
+}
+
+bayes_expiry {
+  enabled = false;
+}
+
+metric_exporter {
+  enabled = false;
+}
+
 emails {
   "whitelist" = [
     "rspamd-test.com"
index 132461d907cd72486f05659ff1b69b6286ef2a72..8bec67a4140aede4f5f090eadb29a3a964804b1e 100644 (file)
@@ -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"