diff options
author | Matt Holt <[email protected]> | 2024-12-20 10:55:02 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2024-12-20 10:55:02 -0700 |
commit | 86da4e8f56f3518bc053dd4f68a78c538a4aab5f (patch) | |
tree | baaf259e90a81d56bf8a2999809d396a02fe1ea9 /modules/caddyhttp/celmatcher_test.go | |
parent | 130c868e95dfd1a8b1d39fd217bc6378f6b72ec0 (diff) | |
parent | ed1c594cdbddf89829eaf1174f414028577b432d (diff) | |
download | caddy-86da4e8f56f3518bc053dd4f68a78c538a4aab5f.tar.gz caddy-86da4e8f56f3518bc053dd4f68a78c538a4aab5f.zip |
Merge branch 'master' into transfer-encoding-matchtransfer-encoding-match
Diffstat (limited to 'modules/caddyhttp/celmatcher_test.go')
-rw-r--r-- | modules/caddyhttp/celmatcher_test.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/caddyhttp/celmatcher_test.go b/modules/caddyhttp/celmatcher_test.go index 26491b7ca..a7e91529c 100644 --- a/modules/caddyhttp/celmatcher_test.go +++ b/modules/caddyhttp/celmatcher_test.go @@ -489,7 +489,11 @@ func TestMatchExpressionMatch(t *testing.T) { } } - if tc.expression.Match(req) != tc.wantResult { + matches, err := tc.expression.MatchWithError(req) + if err != nil { + t.Errorf("MatchExpression.Match() error = %v", err) + } + if matches != tc.wantResult { t.Errorf("MatchExpression.Match() expected to return '%t', for expression : '%s'", tc.wantResult, tc.expression.Expr) } }) @@ -532,7 +536,7 @@ func BenchmarkMatchExpressionMatch(b *testing.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - tc.expression.Match(req) + tc.expression.MatchWithError(req) } }) } |