]> git.kaiwu.me - haproxy.git/commit
REGTESTS: converter: cover all the map match methods and output types
authorWilly Tarreau <w@1wt.eu>
Mon, 21 Sep 2026 20:10:33 +0000 (20:10 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 14:26:01 +0000 (16:26 +0200)
commit30fa39c655e11da4c38c79acd7959a118b7debaa
treed82a23d1e7b952ba4258dd6d4b48ff2c16721632
parente8c755ff476d1d99f5ba80d7f4e541369dd9a026
REGTESTS: converter: cover all the map match methods and output types

Out of the 38 registered map converters, only map, map_str, map_dom,
map_beg and map_regm were exercised by the existing reg-tests, which
left the wiring of most of the entries of the keyword table unverified.

This test looks up every one of them at least once: the str, beg, sub,
dir, dom, end, int, ip, reg and regm match methods combined with the
default (string), _int, _ip and _key output types. It also covers an
integer range key, an IPv6 key, a network key, the difference between
map_reg and map_regm on a value holding a back-reference, the default
value argument and the failure of the converter when nothing matches
and no default is provided.

The output type is applied to the whole map at load time, so the same
key set is duplicated in three files holding string, integer and address
values, plus two smaller files for the integer and address keyed maps.
reg-tests/converter/map_variants-akey-ip.map [new file with mode: 0644]
reg-tests/converter/map_variants-akey.map [new file with mode: 0644]
reg-tests/converter/map_variants-ikey-ip.map [new file with mode: 0644]
reg-tests/converter/map_variants-ikey.map [new file with mode: 0644]
reg-tests/converter/map_variants-int.map [new file with mode: 0644]
reg-tests/converter/map_variants-ip.map [new file with mode: 0644]
reg-tests/converter/map_variants.map [new file with mode: 0644]
reg-tests/converter/map_variants.vtc [new file with mode: 0644]