Christopher Faulet | f97f846 | 2020-04-24 16:25:28 +0200 | [diff] [blame] | 1 | varnishtest "Health-checks: agent-check" |
Willy Tarreau | 55da2b9 | 2020-09-29 10:58:04 +0200 | [diff] [blame] | 2 | #REQUIRE_VERSION=1.8 |
Christopher Faulet | f97f846 | 2020-04-24 16:25:28 +0200 | [diff] [blame] | 3 | #REGTEST_TYPE=slow |
| 4 | feature ignore_unknown_macro |
| 5 | |
| 6 | barrier b1 cond 2 -cyclic |
| 7 | barrier b2 cond 2 -cyclic |
| 8 | |
| 9 | server s1 { |
| 10 | barrier b1 sync |
| 11 | recv 5 |
| 12 | send "75%,max-conn:30,maint,down\n" |
Christopher Faulet | cb436f0 | 2020-05-05 08:10:36 +0200 | [diff] [blame] | 13 | expect_close |
Christopher Faulet | f97f846 | 2020-04-24 16:25:28 +0200 | [diff] [blame] | 14 | barrier b2 sync |
| 15 | } -start |
| 16 | |
| 17 | |
| 18 | haproxy h1 -conf { |
| 19 | defaults |
| 20 | mode tcp |
| 21 | timeout client 1s |
| 22 | timeout server 1s |
| 23 | timeout connect 100ms |
| 24 | |
| 25 | backend be1 |
| 26 | log ${S1_addr}:${S1_port} daemon |
| 27 | option log-health-checks |
| 28 | server srv ${s1_addr}:${s1_port} weight 100 agent-check agent-addr ${s1_addr} agent-port ${s1_port} agent-send "pouet" agent-inter 100ms |
| 29 | } -start |
| 30 | |
| 31 | haproxy h1 -cli { |
| 32 | send "show servers state" |
| 33 | expect ~ "be1 1 srv 127.0.0.1 2 0 100 100 [[:digit:]]+ 1 0 [[:digit:]] 0 [[:digit:]]+ 0 0 - ${s1_port} -" |
| 34 | barrier b1 sync |
| 35 | barrier b2 sync |
| 36 | send "show servers state" |
| 37 | expect ~ "be1 1 srv 127.0.0.1 0 1 75 100 [[:digit:]]+ 1 0 [[:digit:]] 0 [[:digit:]]+ 0 0 - ${s1_port} -" |
| 38 | } |