Skip to content

Commit bc207ba

Browse files
ivanmatmatiGopher Bot
authored andcommitted
TEST/MINOR: assert generated regsub expression in RequestRedirect prefix test
The prefix-match-on-non-root test case only checked wantLen and wantType, leaving the generated location expression unverified. Add wantValue to pin the correct regsub form and prevent regression on the backreference fix.
1 parent 399c852 commit bc207ba

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

k8s/gate/haproxy/filters/http_filters_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ func TestRequestRedirectRules(t *testing.T) {
198198
matchPrefix: "/old",
199199
wantLen: 1,
200200
wantType: "location",
201+
wantValue: "%[path,regsub(^/old,/new)]",
201202
},
202203
{
203204
name: "custom status code",

0 commit comments

Comments
 (0)