diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-12-31 19:54:14 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-12-31 19:54:14 +0000 |
commit | df5de37976b29f62d926184586697bb09059ad24 (patch) | |
tree | a557af4a3f13e53e2829e584ada6be94dafa98d3 /test | |
parent | 82422318d7e4db3a9b9330e0cda8aa5af6bf5a61 (diff) | |
download | rspamd-df5de37976b29f62d926184586697bb09059ad24.tar.gz rspamd-df5de37976b29f62d926184586697bb09059ad24.zip |
[Test] Fix another test
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/cases/230_tcp.robot | 2 | ||||
-rw-r--r-- | test/functional/lua/rspamadm/test_tcp_client.lua | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/test/functional/cases/230_tcp.robot b/test/functional/cases/230_tcp.robot index 2deff4110..f5591a8b8 100644 --- a/test/functional/cases/230_tcp.robot +++ b/test/functional/cases/230_tcp.robot @@ -41,7 +41,7 @@ Sync API TCP request Sync API TCP get request #Check url /request get HTTP_SYNC_EOF_get hello world - Check url /content-length get HTTP_SYNC_CONTENT_get hello world + Check url /request get HTTP_SYNC_CONTENT_get hello world # Broken due to dummy_https issues, disable for now #Sync API TCP post request diff --git a/test/functional/lua/rspamadm/test_tcp_client.lua b/test/functional/lua/rspamadm/test_tcp_client.lua index 796fe913b..eb103db18 100644 --- a/test/functional/lua/rspamadm/test_tcp_client.lua +++ b/test/functional/lua/rspamadm/test_tcp_client.lua @@ -9,6 +9,10 @@ local is_ok, connection = tcp_sync.connect { timeout = 20, port = 18080, } +if not is_ok then + logger.errx(rspamd_config, 'connect error: %1', connection) + return +end local err is_ok, err = connection:write(string.format('POST /request HTTP/1.1\r\nConnection: close\r\n\r\n')) @@ -34,7 +38,7 @@ while true do end local value - local header = header_line:gsub("([%w-]+): (.*)", + local header = header_line:gsub("([%w-]+): (.*)", function (h, v) value = v; return h:lower() end) logger.info('parsed header: %1 -> "%2"', header, value) |