From: Christopher Faulet Date: Mon, 26 May 2025 05:49:50 +0000 (+0200) Subject: REGTESTS: Make the script testing conditional set-var compatible with Vtest2 X-Git-Tag: v3.2.0~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82c291124;p=thirdparty%2Fhaproxy.git REGTESTS: Make the script testing conditional set-var compatible with Vtest2 VTest2 will replaced VTest in few months. There is not so much change expected. One of them is that a User-Agent header is added by default in all requests, except if an custom one is already set or if "-nouseragent" option is used. To still be compatible with VTest, it is not possible to use the option to avoid the header addition. So, a custom user-agent is added in the last test of "sample_fetches/cond_set_var.vtc" to be sure it will pass with Vtest and Vtest2. It is mandatory because the request length is tested. --- diff --git a/reg-tests/sample_fetches/cond_set_var.vtc b/reg-tests/sample_fetches/cond_set_var.vtc index 82961e1007..ea85d6cfb7 100644 --- a/reg-tests/sample_fetches/cond_set_var.vtc +++ b/reg-tests/sample_fetches/cond_set_var.vtc @@ -355,8 +355,8 @@ client c9 -connect ${h1_mainfe_sock} { } -run client c10 -connect ${h1_mainfe_sock} { - txreq -url "/converter" -hdr "X-Cust: foobar" + txreq -url "/converter" -hdr "User-Agent: c10" -hdr "X-Cust: foobar" rxresp expect resp.status == 200 - expect resp.http.x-var == "proc.req_len=35 sess.x_cust=foobar" + expect resp.http.x-var == "proc.req_len=52 sess.x_cust=foobar" } -run