From 9b5d1e422470489f5bc710ac8aa94276a6dd1819 Mon Sep 17 00:00:00 2001 From: Joel Speed Date: Tue, 19 Apr 2022 10:05:00 +0100 Subject: [PATCH] Fixup benchmark --- pkg/authorization/rules_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/authorization/rules_test.go b/pkg/authorization/rules_test.go index 9abb25c5..38c007ec 100644 --- a/pkg/authorization/rules_test.go +++ b/pkg/authorization/rules_test.go @@ -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") }