Merge branch v2.11 into v3.0
This commit is contained in:
commit
9f145dbc28
130 changed files with 245 additions and 322 deletions
|
@ -44,6 +44,28 @@ func TestReplacePathRegex(t *testing.T) {
|
|||
expectedRawPath: "/who-am-i/and/who-am-i",
|
||||
expectedHeader: "/whoami/and/whoami",
|
||||
},
|
||||
{
|
||||
desc: "empty replacement",
|
||||
path: "/whoami/and/whoami",
|
||||
config: dynamic.ReplacePathRegex{
|
||||
Replacement: "",
|
||||
Regex: `/whoami`,
|
||||
},
|
||||
expectedPath: "/and",
|
||||
expectedRawPath: "/and",
|
||||
expectedHeader: "/whoami/and/whoami",
|
||||
},
|
||||
{
|
||||
desc: "empty trimmed replacement",
|
||||
path: "/whoami/and/whoami",
|
||||
config: dynamic.ReplacePathRegex{
|
||||
Replacement: " ",
|
||||
Regex: `/whoami`,
|
||||
},
|
||||
expectedPath: "/and",
|
||||
expectedRawPath: "/and",
|
||||
expectedHeader: "/whoami/and/whoami",
|
||||
},
|
||||
{
|
||||
desc: "no match",
|
||||
path: "/whoami/and/whoami",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue