MCPcopy
hub / github.com/apache/casbin / TestFilteredAdapterInvalidFilepath

Function TestFilteredAdapterInvalidFilepath

filter_test.go:200–209  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

198}
199
200func TestFilteredAdapterInvalidFilepath(t *testing.T) {
201 e, _ := NewEnforcer()
202
203 adapter := fileadapter.NewFilteredAdapter("examples/does_not_exist_policy.csv")
204 _ = e.InitWithAdapter("examples/rbac_with_domains_model.conf", adapter)
205
206 if err := e.LoadFilteredPolicy(nil); err == nil {
207 t.Errorf("expected error in LoadFilteredPolicy, but got nil")
208 }
209}

Callers

nothing calls this directly

Calls 3

InitWithAdapterMethod · 0.95
LoadFilteredPolicyMethod · 0.95
NewEnforcerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…