We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1776fab commit 190ad60Copy full SHA for 190ad60
1 file changed
modules/caddyhttp/rewrite/rewrite_test.go
@@ -529,15 +529,9 @@ func TestQueryOpsReplaceScopedToKey(t *testing.T) {
529
repl.Set("http.request.uri.path", tc.input.URL.Path)
530
repl.Set("http.request.uri.query", tc.input.URL.RawQuery)
531
532
- // we can't directly call Provision() without a valid caddy.Context
533
- // so here we ad-hoc compile the regex
534
for _, rep := range tc.ops.Replace {
535
- if rep.SearchRegexp != "" {
536
- re, err := regexp.Compile(rep.SearchRegexp)
537
- if err != nil {
538
- t.Fatal(err)
539
- }
540
- rep.re = re
+ if err := rep.Provision(caddy.Context{}); err != nil {
+ t.Fatal(err)
541
}
542
543
0 commit comments