From df5de37976b29f62d926184586697bb09059ad24 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 31 Dec 2022 19:54:14 +0000 Subject: [PATCH] [Test] Fix another test --- test/functional/cases/230_tcp.robot | 2 +- 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) -- 2.39.5