Skip to content

Commit

Permalink
using assert.logfile
Browse files Browse the repository at this point in the history
  • Loading branch information
chobits committed Dec 9, 2024
1 parent 47f1598 commit 5620a51
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions spec/02-integration/09-hybrid_mode/10-forward-proxy_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,9 @@ for _, strategy in helpers.each_strategy() do
end

-- check the debug log of the `cluster_use_proxy` option
path = pl_path.join("servroot2", "logs", "error.log")
contents = pl_file.read(path)
if rpc == "on" and inc_sync == "on" then
assert.matches("%[rpc%] using proxy", contents)
else
assert.matches("%[clustering%] using proxy", contents)
end
local line = inc_sync == "on" and "[rpc] using proxy" or
"[clustering] using proxy"
assert.logfile("servroot2/logs/error.log").has.line(line, true)
end)
end)
end)
Expand Down

0 comments on commit 5620a51

Please sign in to comment.