]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTESTS: healthcheckmail: Relax matching on the healthcheck log message
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 12 Sep 2022 07:58:47 +0000 (09:58 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 12 Sep 2022 08:02:27 +0000 (10:02 +0200)
Depending on the timing, the conneciton on lisrv listener may be fully
accepted before any reject. Thus, instead of getting a socket error, an
invalid L7 response is reported. There is no reason to be strick on the
error type. Any failure is good here, because we just want to test the
email-alert feature.

This patch should fix issue #1857. It may be backported as far as 2.2.

reg-tests/mailers/healthcheckmail.vtc

index 00704e6015e800b3e204a92d4825d336cae03f79..821250fc8334a03d2a352d4f029737c30a4f31ed 100644 (file)
@@ -5,7 +5,7 @@ feature ignore_unknown_macro
 
 syslog S1 -level notice {
     recv
-    expect ~ "[^:\\[ ]\\[${h1_pid}\\]: Health check for server be1/srv1 failed.+reason: Socket error.+info: \".+\".+check duration: [[:digit:]]+ms.+status: 0/1 DOWN."
+    expect ~ "[^:\\[ ]\\[${h1_pid}\\]: Health check for server be1/srv1 failed.+check duration: [[:digit:]]+ms.+status: 0/1 DOWN."
     recv info
     expect ~ "[^:\\[ ]\\[${h1_pid}\\]: Result=SUCCESS Bytes=[[:digit:]]+"
 } -start