(t *testing.T, e *SyncedCachedEnforcer, sub string, obj interface{}, act string, res bool)
| 21 | ) |
| 22 | |
| 23 | func testSyncEnforceCache(t *testing.T, e *SyncedCachedEnforcer, sub string, obj interface{}, act string, res bool) { |
| 24 | t.Helper() |
| 25 | if myRes, _ := e.Enforce(sub, obj, act); myRes != res { |
| 26 | t.Errorf("%s, %v, %s: %t, supposed to be %t", sub, obj, act, myRes, res) |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | func TestSyncCache(t *testing.T) { |
| 31 | e, _ := NewSyncedCachedEnforcer("examples/basic_model.conf", "examples/basic_policy.csv") |
no test coverage detected
searching dependent graphs…