Skip to content

Commit 8420094

Browse files
committed
Fix benchmark to match objects
1 parent 46f9a84 commit 8420094

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

coderd/rbac/builtin_internal_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ func BenchmarkRBACValueAllocation(b *testing.B) {
5151
})
5252
b.Run("JSONRegoValue", func(b *testing.B) {
5353
for i := 0; i < b.N; i++ {
54-
_, err := ast.InterfaceToValue(jsonSubject)
54+
_, err := ast.InterfaceToValue(map[string]interface{}{
55+
"subject": jsonSubject,
56+
"action": ActionRead,
57+
"object": obj,
58+
})
5559
require.NoError(b, err)
5660
}
5761
})

coderd/rbac/testinput.json

Whitespace-only changes.

0 commit comments

Comments
 (0)