]> git.kaiwu.me - haproxy.git/commit
REGTESTS: converter: add a test for the when() and debug() converters
authorWilly Tarreau <w@1wt.eu>
Mon, 21 Sep 2026 20:39:39 +0000 (20:39 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 14:55:57 +0000 (16:55 +0200)
commitac773f99ef25ab0079ef0ef73fbcbed33217ef93
treecea1215b76ce834801bd496a82d8b86ce2f8c038
parent949cd8cf42f2b935a49041d71b7abf9f1da5d052
REGTESTS: converter: add a test for the when() and debug() converters

Neither converter was covered. when() only lets its input through when
the condition is met, so the test builds a string made of one bracketed
field per condition and compares it for three kinds of transactions: one
forwarded to a healthy server, one whose server cannot be reached, and
one answered by the stats applet. This covers the error, normal,
forwarded, processed, toapplet, stopping and acl conditions as well as
the negated form.

debug() is checked to be transparent for the sample it is inserted in,
and its copy is read back from the default sink with "show events".
reg-tests/converter/when_debug.vtc [new file with mode: 0644]