MCPcopy Index your code
hub / github.com/coder/coder / AssertActor

Method AssertActor

coderd/coderdtest/authorize.go:236–238  ·  view source on GitHub ↗

AssertActor asserts in order. If the order of authz calls does not match, this will fail.

(t *testing.T, actor rbac.Subject, did ...ActionObjectPair)

Source from the content-addressed store, hash-verified

234// AssertActor asserts in order. If the order of authz calls does not match,
235// this will fail.
236func (r *RecordingAuthorizer) AssertActor(t *testing.T, actor rbac.Subject, did ...ActionObjectPair) {
237 r.AssertActorID(t, actor.ID, did...)
238}
239
240func (r *RecordingAuthorizer) AssertActorID(t *testing.T, id string, did ...ActionObjectPair) {
241 r.Lock()

Callers 5

TestAuthzRecorderFunction · 0.95
TestCacheFunction · 0.95
SubtestWithDBMethod · 0.95
AssertInOrderMethod · 0.80
TestNewFunction · 0.80

Calls 1

AssertActorIDMethod · 0.95

Tested by 4

TestAuthzRecorderFunction · 0.76
TestCacheFunction · 0.76
SubtestWithDBMethod · 0.76
TestNewFunction · 0.64