]> git.kaiwu.me - haproxy.git/commitdiff
REGTESTS: sample_fetches: check the rtt headers this test was filling
authorWilly Tarreau <w@1wt.eu>
Tue, 22 Sep 2026 20:08:44 +0000 (20:08 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 15:25:37 +0000 (17:25 +0200)
Three of the four headers the test sets were never read back, so only
bc_rtt was really checked. They are all matched against an integer now,
which is all that can be asserted on a timing value.

reg-tests/sample_fetches/tcpinfo_rtt.vtc

index cfab9c59abf6bfd8db78f5c14746e979e8b60b53..1f7d883df5822ccefcaccc599b9a1d2ef5193e06 100644 (file)
@@ -13,6 +13,7 @@ haproxy h1 -conf {
     .if feature(THREAD)
         thread-groups 1
     .endif
+        chroot /
 
   defaults common
       mode http
@@ -40,5 +41,8 @@ client c1 -connect ${h1_feh1_sock} {
         txreq -req GET -url /
         rxresp
         expect resp.status == 200
-        expect resp.http.x-test2 ~ "[0-9]+"
+        expect resp.http.x-test1 ~ "^[0-9]+$"
+        expect resp.http.x-test2 ~ "^[0-9]+$"
+        expect resp.http.x-test3 ~ "^[0-9]+$"
+        expect resp.http.x-test4 ~ "^[0-9]+$"
 } -run
\ No newline at end of file