mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-12 14:35:14 +00:00
6f746af915
Every reg-test now runs without any warning, so let's acivate -dW by
default so the new ones will inheritate the option.
This patch reverts 9d511b3c
("REGTESTS: enable -dW on almost all tests
to fail on warnings") and adds -dW in the default HAPROXY_ARGS of
scripts/run-regtests.sh instead.
44 lines
937 B
Plaintext
44 lines
937 B
Plaintext
varnishtest "stick table: src_conn_rate"
|
|
feature ignore_unknown_macro
|
|
|
|
haproxy h0 -conf {
|
|
defaults
|
|
mode http
|
|
timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
timeout client "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
timeout server "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
|
|
listen li
|
|
bind "fd@${fe1}"
|
|
http-request track-sc0 src table conn_rate_table
|
|
http-request deny if { src_conn_rate(conn_rate_table) gt 3 }
|
|
http-request return status 200
|
|
|
|
backend conn_rate_table
|
|
stick-table type ip size 1m expire 1m store conn_rate(1m)
|
|
} -start
|
|
|
|
client c0 -connect ${h0_fe1_addr}:${h0_fe1_port} {
|
|
txreq
|
|
rxresp
|
|
expect resp.status == 200
|
|
} -run
|
|
|
|
client c1 -connect ${h0_fe1_addr}:${h0_fe1_port} {
|
|
txreq
|
|
rxresp
|
|
expect resp.status == 200
|
|
} -run
|
|
|
|
client c2 -connect ${h0_fe1_addr}:${h0_fe1_port} {
|
|
txreq
|
|
rxresp
|
|
expect resp.status == 200
|
|
} -run
|
|
|
|
client c3 -connect ${h0_fe1_addr}:${h0_fe1_port} {
|
|
txreq
|
|
rxresp
|
|
expect resp.status == 403
|
|
} -run
|