summaryrefslogtreecommitdiffstats
path: root/test/functional/cases/231_tcp_down.robot
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 21:30:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 21:30:40 +0000
commit133a45c109da5310add55824db21af5239951f93 (patch)
treeba6ac4c0a950a0dda56451944315d66409923918 /test/functional/cases/231_tcp_down.robot
parentInitial commit. (diff)
downloadrspamd-133a45c109da5310add55824db21af5239951f93.tar.xz
rspamd-133a45c109da5310add55824db21af5239951f93.zip
Adding upstream version 3.8.1.upstream/3.8.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/functional/cases/231_tcp_down.robot')
-rw-r--r--test/functional/cases/231_tcp_down.robot28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/functional/cases/231_tcp_down.robot b/test/functional/cases/231_tcp_down.robot
new file mode 100644
index 0000000..5d6c791
--- /dev/null
+++ b/test/functional/cases/231_tcp_down.robot
@@ -0,0 +1,28 @@
+*** 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 ***
+${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
+ [Documentation] We don't create HTTP server here, that's why
+ ... all requests fail with "connection refused"
+ Check url /request get HTTP_ASYNC_RESPONSE Socket error detected: Connection refused
+ Check url /content-length get HTTP_SYNC_WRITE_ERROR Socket error detected: Connection refused
+
+*** Keywords ***
+Check url
+ [Arguments] ${url} ${method} ${expect_symbol} @{expect_options}
+ Scan File ${MESSAGE} URL=${url} Method=${method}
+ ... Settings={symbols_enabled = [SIMPLE_TCP_ASYNC_TEST, SIMPLE_TCP_TEST]}
+ Expect Symbol With Exact Options ${expect_symbol} @{expect_options}