(t *testing.T)
| 58 | } |
| 59 | |
| 60 | func TestStopAutoLoadPolicy(t *testing.T) { |
| 61 | e, _ := NewSyncedEnforcer("examples/basic_model.conf", "examples/basic_policy.csv") |
| 62 | e.StartAutoLoadPolicy(5 * time.Millisecond) |
| 63 | if !e.IsAutoLoadingRunning() { |
| 64 | t.Error("auto load is not running") |
| 65 | } |
| 66 | e.StopAutoLoadPolicy() |
| 67 | // Need a moment, to exit goroutine |
| 68 | time.Sleep(10 * time.Millisecond) |
| 69 | if e.IsAutoLoadingRunning() { |
| 70 | t.Error("auto load is still running") |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | func testSyncedEnforcerGetPolicy(t *testing.T, e *SyncedEnforcer, res [][]string) { |
| 75 | t.Helper() |
nothing calls this directly
no test coverage detected
searching dependent graphs…