MCPcopy Index your code
hub / github.com/apache/casbin / testSyncEnforceCache

Function testSyncEnforceCache

enforcer_cached_synced_test.go:23–28  ·  view source on GitHub ↗
(t *testing.T, e *SyncedCachedEnforcer, sub string, obj interface{}, act string, res bool)

Source from the content-addressed store, hash-verified

21)
22
23func 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
30func TestSyncCache(t *testing.T) {
31 e, _ := NewSyncedCachedEnforcer("examples/basic_model.conf", "examples/basic_policy.csv")

Callers 1

TestSyncCacheFunction · 0.85

Calls 1

EnforceMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…