From: Andrew Lewis Date: Mon, 24 May 2021 14:33:20 +0000 (+0200) Subject: [Test] Unmerge http / tcp tests X-Git-Tag: 3.0~354^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F3768%2Fhead;p=thirdparty%2Frspamd.git [Test] Unmerge http / tcp tests --- diff --git a/test/functional/cases/001_merged/220_http.robot b/test/functional/cases/220_http.robot similarity index 90% rename from test/functional/cases/001_merged/220_http.robot rename to test/functional/cases/220_http.robot index a6bf5ff650..2812b4efa6 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 similarity index 88% rename from test/functional/cases/001_merged/230_tcp.robot rename to test/functional/cases/230_tcp.robot index 89ec7ea5a9..6c0c0a9c89 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 similarity index 71% rename from test/functional/cases/001_merged/231_tcp_down.robot rename to test/functional/cases/231_tcp_down.robot index 088a605539..5d6c791bb2 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 466003703e..84bffe8ddf 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 132461d907..8bec67a414 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"