]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTESTS: fix maxconn update with agent-check
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 22 Jun 2021 14:23:11 +0000 (16:23 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 22 Jun 2021 14:34:23 +0000 (16:34 +0200)
Correct the typo in the parameter used to update the 'maxconn' via
agent-check. The test is also completed to detect the update of maxconn
using CLI 'show stats'.

reg-tests/checks/agent-check.vtc

index 134569319ae2e3da323a4fe3f501a68b880edacc..4bab93474b7cda03fccaa6bd9956caddbb2e2954 100644 (file)
@@ -9,7 +9,7 @@ barrier b2 cond 2 -cyclic
 server s1 {
   barrier b1 sync
   recv 5
-  send "75%,max-conn:30,maint,down\n"
+  send "75%,maxconn:30,maint,down\n"
   expect_close
   barrier b2 sync
 } -start
@@ -31,8 +31,13 @@ haproxy h1 -conf {
 haproxy h1 -cli {
     send "show servers state"
     expect ~ "be1 1 srv 127.0.0.1 2 0 100 100 [[:digit:]]+ 1 0 [[:digit:]] 0 [[:digit:]]+ 0 0 - ${s1_port} -"
+    send "show stat"
+    expect ~ "be1,srv,0,0,0,0,,"
+
     barrier b1 sync
     barrier b2 sync
     send "show servers state"
     expect ~ "be1 1 srv 127.0.0.1 0 1 75 100 [[:digit:]]+ 1 0 [[:digit:]] 0 [[:digit:]]+ 0 0 - ${s1_port} -"
+    send "show stat"
+    expect ~ "be1,srv,0,0,0,0,30"
 }