(t *testing.T, s *Server, enforcerHandler int32, sub string, obj string, act string, res bool)
| 115 | } |
| 116 | |
| 117 | func testModel(t *testing.T, s *Server, enforcerHandler int32, sub string, obj string, act string, res bool) { |
| 118 | t.Helper() |
| 119 | |
| 120 | reply, err := s.Enforce(context.TODO(), &pb.EnforceRequest{EnforcerHandler: enforcerHandler, Params: []string{sub, obj, act}}) |
| 121 | assert.NoError(t, err) |
| 122 | |
| 123 | if reply.Res != res { |
| 124 | t.Errorf("%s, %v, %s: %t, supposed to be %t", sub, obj, act, !res, res) |
| 125 | } |
| 126 | } |
no test coverage detected