MCPcopy Create free account
hub / github.com/astercloud/aster / TestInMemoryAuditLog_GetEvent_NotFound

Function TestInMemoryAuditLog_GetEvent_NotFound

pkg/security/audit_test.go:131–139  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

129}
130
131func TestInMemoryAuditLog_GetEvent_NotFound(t *testing.T) {
132 auditLog := NewInMemoryAuditLog(nil)
133 defer func() { _ = auditLog.Close() }()
134
135 _, err := auditLog.GetEvent("nonexistent")
136 if err == nil {
137 t.Error("expected error for nonexistent event, got nil")
138 }
139}
140
141func TestInMemoryAuditLog_GetEventsByUser(t *testing.T) {
142 auditLog := NewInMemoryAuditLog(nil)

Callers

nothing calls this directly

Calls 4

CloseMethod · 0.95
GetEventMethod · 0.95
NewInMemoryAuditLogFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected