]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Test] Fix another test
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 31 Dec 2022 19:54:14 +0000 (19:54 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 31 Dec 2022 19:54:14 +0000 (19:54 +0000)
test/functional/cases/230_tcp.robot
test/functional/lua/rspamadm/test_tcp_client.lua

index 2deff4110e8eebde2ac9cefa60d7808b9851d451..f5591a8b87b62329b2ffed5fdaa9b24e014090f6 100644 (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
index 796fe913b5bd25019cd9fc72b81175124acc58f3..eb103db18feeb2db2a6b7156c64e1c07453c6f55 100644 (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)