Fixup benchmark

This commit is contained in:
Joel Speed 2022-04-19 10:05:00 +01:00
parent 5b31cde578
commit 9b5d1e4224
No known key found for this signature in database
GPG Key ID: 6E80578D6751DEFB
1 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ func benchmarkRuleSetMatches(ruleCount int, b *testing.B) {
},
}
requestRules := options.RequestRules{}
requestRules := []options.AuthorizationRule{}
for i := 0; i <= ruleCount; i++ {
requestRules = append(requestRules, rule1)
}
@ -55,7 +55,7 @@ func benchmarkRuleSetMatches(ruleCount int, b *testing.B) {
var r AuthorizationPolicy
for n := 0; n < b.N; n++ {
r = ruleSet.Matches(req)
r = ruleSet.MatchesRequest(req)
if r != NonePolicy {
b.Fatal("expected policy not to match")
}