(t *testing.T)
| 35 | } |
| 36 | |
| 37 | func TestGetList(t *testing.T) { |
| 38 | e, _ := NewEnforcer("examples/rbac_model.conf", "examples/rbac_policy.csv") |
| 39 | |
| 40 | testStringList(t, "Subjects", e.GetAllSubjects, []string{"alice", "bob", "data2_admin"}) |
| 41 | testStringList(t, "Objects", e.GetAllObjects, []string{"data1", "data2"}) |
| 42 | testStringList(t, "Actions", e.GetAllActions, []string{"read", "write"}) |
| 43 | testStringList(t, "Roles", e.GetAllRoles, []string{"data2_admin"}) |
| 44 | testStringList(t, "Users", e.GetAllUsers, []string{"alice", "bob"}) |
| 45 | } |
| 46 | |
| 47 | func TestGetListWithDomains(t *testing.T) { |
| 48 | e, _ := NewEnforcer("examples/rbac_with_domains_model.conf", "examples/rbac_with_domains_policy.csv") |
nothing calls this directly
no test coverage detected
searching dependent graphs…