AssertInOrder must be called in the correct order of authz checks. If the objects or actions are not in the correct order, the test will fail.
(t *testing.T, action policy.Action, objects ...interface{})
| 100 | // AssertInOrder must be called in the correct order of authz checks. If the objects |
| 101 | // or actions are not in the correct order, the test will fail. |
| 102 | func (a RBACAsserter) AssertInOrder(t *testing.T, action policy.Action, objects ...interface{}) { |
| 103 | converted := a.convertObjects(t, objects...) |
| 104 | pairs := make([]ActionObjectPair, 0, len(converted)) |
| 105 | for _, obj := range converted { |
| 106 | pairs = append(pairs, a.Recorder.Pair(action, obj)) |
| 107 | } |
| 108 | a.Recorder.AssertActor(t, a.Subject, pairs...) |
| 109 | } |
| 110 | |
| 111 | // convertObjects converts the codersdk types to rbac.Object. Unfortunately |
| 112 | // does not have type safety, and instead uses a t.Fatal to enforce types. |
nothing calls this directly
no test coverage detected