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

Function verifySelectiveBufferOutput

logger_test.go:199–213  ·  view source on GitHub ↗
(t *testing.T, logOutput string)

Source from the content-addressed store, hash-verified

197}
198
199func verifySelectiveBufferOutput(t *testing.T, logOutput string) {
200 t.Helper()
201 if !strings.Contains(logOutput, "[enforce]") {
202 t.Errorf("Expected log output to contain enforce events")
203 }
204 if !strings.Contains(logOutput, "[addPolicy]") {
205 t.Errorf("Expected log output to contain addPolicy event")
206 }
207 if strings.Contains(logOutput, "[removePolicy]") {
208 t.Errorf("Did not expect log output to contain removePolicy event")
209 }
210 if strings.Contains(logOutput, "[loadPolicy]") {
211 t.Errorf("Did not expect log output to contain loadPolicy event")
212 }
213}
214
215func verifySelectiveCallbackEntries(t *testing.T, entries []*log.LogEntry) {
216 t.Helper()

Callers 1

TestSetEventTypesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…