Debian Codegraph @

test/functional/cases/231_tcp_down.robot

raw
1 *** Settings ***
2 Suite Setup Rspamd Setup
3 Suite Teardown Rspamd Teardown
4 Library ${RSPAMD_TESTDIR}/lib/rspamd.py
5 Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
6 Variables ${RSPAMD_TESTDIR}/lib/vars.py
7
8 *** Variables ***
9 ${CONFIG} ${RSPAMD_TESTDIR}/configs/lua_test.conf
10 ${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml
11 ${RSPAMD_LUA_SCRIPT} ${RSPAMD_TESTDIR}/lua/tcp.lua
12 ${RSPAMD_SCOPE} Suite
13 ${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
14
15
16 *** Test Cases ***
17 Sync API TCP get request when server is down
18 [Documentation] We don't create HTTP server here, that's why
19 ... all requests fail with "connection refused"
20 Check url /request get HTTP_ASYNC_RESPONSE Socket error detected: Connection refused
21 Check url /content-length get HTTP_SYNC_WRITE_ERROR Socket error detected: Connection refused
22
23 *** Keywords ***
24 Check url
25 [Arguments] ${url} ${method} ${expect_symbol} @{expect_options}
26 Scan File ${MESSAGE} URL=${url} Method=${method}
27 ... Settings={symbols_enabled = [SIMPLE_TCP_ASYNC_TEST, SIMPLE_TCP_TEST]}
28 Expect Symbol With Exact Options ${expect_symbol} @{expect_options}