From 3a56ea56a7f5357902ca4ed5c1aff54bf40b899f Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 1 Oct 2025 13:23:51 -0500 Subject: [PATCH] test: fix rbac benchmark to test performance instead of cache (#20097) The benchmark should be testing the performance of `authorize`, not a cache lookup --- coderd/rbac/authz_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coderd/rbac/authz_test.go b/coderd/rbac/authz_test.go index cd2bbb808a..2595513124 100644 --- a/coderd/rbac/authz_test.go +++ b/coderd/rbac/authz_test.go @@ -187,7 +187,7 @@ func BenchmarkRBACAuthorizeGroups(b *testing.B) { uuid.MustParse("0632b012-49e0-4d70-a5b3-f4398f1dcd52"), uuid.MustParse("70dbaa7a-ea9c-4f68-a781-97b08af8461d"), ) - authorizer := rbac.NewStrictCachingAuthorizer(prometheus.NewRegistry()) + authorizer := rbac.NewAuthorizer(prometheus.NewRegistry()) // Same benchmark cases, but this time groups will be used to match. // Some '*' permissions will still match, but using a fake action reduces