(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func TestNewInMemoryAuditLog(t *testing.T) { |
| 10 | auditLog := NewInMemoryAuditLog(nil) |
| 11 | |
| 12 | if auditLog == nil { |
| 13 | t.Fatal("expected InMemoryAuditLog, got nil") |
| 14 | } |
| 15 | |
| 16 | if auditLog.config.StorageType != StorageTypeMemory { |
| 17 | t.Errorf("expected StorageType Memory, got %v", auditLog.config.StorageType) |
| 18 | } |
| 19 | |
| 20 | // 清理 |
| 21 | _ = auditLog.Close() |
| 22 | } |
| 23 | |
| 24 | func TestInMemoryAuditLog_LogEvent(t *testing.T) { |
| 25 | auditLog := NewInMemoryAuditLog(nil) |
nothing calls this directly
no test coverage detected