From 08f3f12f106bdcd76f5ad45111eaf4f4bde21e6b Mon Sep 17 00:00:00 2001 From: sebres Date: Fri, 14 Sep 2018 10:44:24 +0200 Subject: [PATCH] fix sporadic test-cases fails: change debug transmitter-message (sometimes confused with expected "Server ready" of server), better syntax for internal subst _use_flush; --- fail2ban/server/transmitter.py | 2 +- fail2ban/tests/fail2banclienttestcase.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fail2ban/server/transmitter.py b/fail2ban/server/transmitter.py index 89879d478..d7cd10b70 100644 --- a/fail2ban/server/transmitter.py +++ b/fail2ban/server/transmitter.py @@ -116,7 +116,7 @@ class Transmitter: elif command[0] == "echo": return command[1:] elif command[0] == "server-status": - logSys.debug("Server ready") + logSys.debug("Status: ready") return "Server ready" elif command[0] == "sleep": value = command[1] diff --git a/fail2ban/tests/fail2banclienttestcase.py b/fail2ban/tests/fail2banclienttestcase.py index 8bd7c0308..c9c5ea41a 100644 --- a/fail2ban/tests/fail2banclienttestcase.py +++ b/fail2ban/tests/fail2banclienttestcase.py @@ -805,7 +805,7 @@ class Fail2banServerTest(Fail2banClientServerBase): "norestored = %(_exec_once)s", "restore = ", "info = ", - "_use_flush_ = echo [] : -- flushing IPs", + "_use_flush_ = echo '[%(name)s] %(actname)s: -- flushing IPs'", "actionstart = echo '[%(name)s] %(actname)s: ** start'", start, "actionreload = echo '[%(name)s] %(actname)s: .. reload'", reload, "actionban = echo '[%(name)s] %(actname)s: ++ ban %(restore)s%(info)s'", ban,