]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTESTS: server: fix agent-check syntax and expectation
authorWilly Tarreau <w@1wt.eu>
Fri, 20 Aug 2021 09:28:15 +0000 (11:28 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 20 Aug 2021 09:28:15 +0000 (11:28 +0200)
Since commit 8d6c6bd ("Leak-plugging on barriers") VTest has become
stricter in its expectations, making this one fail. The agent-check
test was expecting a close on the server, which normally does not
happen before the server responds. In addition, it was really sending
"hello" (with the quotes) due to the config file syntax, which explains
why test test log reported that '"hell' was received, and complained
that 0x6f ('o') was read instead of a shutdown. This has been fixed
as well by using single-quotes.

There is no need to backport this test as it's only in 2.5.

reg-tests/server/cli_add_check_server.vtc

index 576ef3c4203aece3f9ee91711cfceaff1c531195..31d4d61cec82e8d6f364dfd1fa327e8e4c916bb0 100644 (file)
@@ -19,7 +19,6 @@ server s2 {
 server s3 {
        recv 5
        send "ready up\n"
-       expect_close
        barrier b2 sync
 } -start
 
@@ -103,7 +102,7 @@ haproxy h1 -cli {
 
 # agent check
 haproxy h1 -cli {
-       send "experimental-mode on; add server be1/s3 ${s1_addr}:${s1_port} agent-check agent-addr ${s3_addr} agent-port ${s3_port} agent-send \"hello\" agent-inter 200ms rise 1 fall 1"
+       send "experimental-mode on; add server be1/s3 ${s1_addr}:${s1_port} agent-check agent-addr ${s3_addr} agent-port ${s3_port} agent-send 'hello' agent-inter 200ms rise 1 fall 1"
        expect ~ "New server registered."
 
        send "enable agent be1/s3"