(t *testing.T, e *testEngine, obj string, act string, res bool)
| 36 | } |
| 37 | |
| 38 | func testEnforceWithoutUsers(t *testing.T, e *testEngine, obj string, act string, res bool) { |
| 39 | t.Helper() |
| 40 | reply, err := e.s.Enforce(e.ctx, &pb.EnforceRequest{EnforcerHandler: e.h, Params: []string{obj, act}}) |
| 41 | assert.NoError(t, err) |
| 42 | |
| 43 | if reply.Res != res { |
| 44 | t.Errorf("%s, %s: %t, supposed to be %t", obj, act, !res, res) |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | func TestRBACModel(t *testing.T) { |
| 49 | s := NewServer() |
no test coverage detected