(t *testing.T)
| 281 | } |
| 282 | |
| 283 | func TestInMemoryAuditLog_Close(t *testing.T) { |
| 284 | auditLog := NewInMemoryAuditLog(nil) |
| 285 | |
| 286 | // 添加一个事件 |
| 287 | _ = auditLog.LogEvent(AuditEvent{Type: AuditTypeUserLogin, UserID: "user1"}) |
| 288 | |
| 289 | // 关闭 |
| 290 | err := auditLog.Close() |
| 291 | if err != nil { |
| 292 | t.Fatalf("Close failed: %v", err) |
| 293 | } |
| 294 | } |
| 295 | |
| 296 | func TestInMemoryAuditLog_ConcurrentWrites(t *testing.T) { |
| 297 | auditLog := NewInMemoryAuditLog(nil) |
nothing calls this directly
no test coverage detected