From 89ecb1b26baa4a9d511d7fe6a50c8bc8414b5ed0 Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Mon, 24 May 2021 16:33:20 +0200 Subject: [PATCH] [Test] Unmerge http / tcp tests --- .../cases/{001_merged => }/220_http.robot | 8 +++++++- .../cases/{001_merged => }/230_tcp.robot | 9 +++++++-- .../cases/{001_merged => }/231_tcp_down.robot | 9 ++++++++- test/functional/configs/merged-local.conf | 16 ++++++++++++++++ test/functional/configs/merged.conf | 6 ------ 5 files changed, 38 insertions(+), 10 deletions(-) rename test/functional/cases/{001_merged => }/220_http.robot (90%) rename test/functional/cases/{001_merged => }/230_tcp.robot (88%) rename test/functional/cases/{001_merged => }/231_tcp_down.robot (71%) 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 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 similarity index 88% rename from test/functional/cases/001_merged/230_tcp.robot rename to 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 similarity index 71% rename from test/functional/cases/001_merged/231_tcp_down.robot rename to 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" -- 2.39.5