Browse Source

[Test] Fix another test

tags/3.5
Vsevolod Stakhov 1 year ago
parent
commit
df5de37976
No account linked to committer's email address

+ 1
- 1
test/functional/cases/230_tcp.robot View File

@@ -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

+ 5
- 1
test/functional/lua/rspamadm/test_tcp_client.lua View File

@@ -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)

Loading…
Cancel
Save