Skip to content

Commit 9e86429

Browse files
committed
test: Add benchmark for static rbac roles
1 parent 90c57a5 commit 9e86429

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

coderd/rbac/authz_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,18 @@ func benchmarkUserCases() (cases []benchmarkCase, users uuid.UUID, orgs []uuid.U
9696
Groups: noiseGroups,
9797
},
9898
},
99+
{
100+
Name: "StaticRoles",
101+
Actor: rbac.Subject{
102+
// Give some extra roles that an admin might have
103+
Roles: rbac.RoleNames{
104+
"auditor", rbac.RoleMember(), rbac.RoleMember(),
105+
rbac.RoleTemplateAdmin(), rbac.RoleUserAdmin()},
106+
ID: user.String(),
107+
Scope: rbac.ScopeAll,
108+
Groups: noiseGroups,
109+
},
110+
},
99111
}
100112
return benchCases, users, orgs
101113
}

0 commit comments

Comments
 (0)