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

Function checkEntryActiveStatus

logger_test.go:234–248  ·  view source on GitHub ↗
(t *testing.T, entry *log.LogEntry)

Source from the content-addressed store, hash-verified

232}
233
234func checkEntryActiveStatus(t *testing.T, entry *log.LogEntry) {
235 t.Helper()
236 switch entry.EventType {
237 case log.EventEnforce, log.EventAddPolicy:
238 if !entry.IsActive {
239 t.Errorf("Expected %s entry to be active", entry.EventType)
240 }
241 case log.EventRemovePolicy, log.EventLoadPolicy:
242 if entry.IsActive {
243 t.Errorf("Expected %s entry to be inactive", entry.EventType)
244 }
245 case log.EventSavePolicy:
246 // SavePolicy event exists but we're not checking it in this test
247 }
248}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…