]> git.kaiwu.me - haproxy.git/commit
REGTESTS: sample_fetches: add a test for the proxy and server state fetches
authorWilly Tarreau <w@1wt.eu>
Mon, 21 Sep 2026 20:22:41 +0000 (20:22 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 14:55:57 +0000 (16:55 +0200)
commita7b8a0fb9c85a2ed91b4fbc4b928ea8f1dcd8ef8
treecc377818310b0c7c6d108fab73c7341f8d887f46
parenta94107a9f31e3d6b25df8a3324df4814459c5bd3
REGTESTS: sample_fetches: add a test for the proxy and server state fetches

None of the fetches reporting the internal state of the proxies and of
their servers was covered. This test checks fe_id, fe_name, fe_defbe,
be_id, be_name, srv_id, srv_name, nbsrv with and without an argument,
srv_is_up, srv_weight, srv_iweight, srv_uweight, act_conn, fe_conn,
be_conn, be_conn_free, srv_conn, srv_conn_free, connslots, queue,
avg_queue, srv_queue, fe_sess_rate, fe_req_rate, be_sess_rate,
srv_sess_rate, stopping, uptime and fe_client_timeout, plus the nbsrv,
srv_is_up, srv_queue and fe_exists converters.

The backend holds a usable server and a disabled one so that nbsrv() and
srv_is_up() have something to distinguish, and both servers have a
maxconn and a maxqueue so that connslots() returns a computable value
instead of the -1 it reports on an unbounded configuration.

The fetches whose implicit argument is the current proxy are placed in
the backend since they require the backend capability.
reg-tests/sample_fetches/proxy_state.vtc [new file with mode: 0644]