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

Function TestNewInMemoryAuditLog

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

Source from the content-addressed store, hash-verified

7)
8
9func 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
24func TestInMemoryAuditLog_LogEvent(t *testing.T) {
25 auditLog := NewInMemoryAuditLog(nil)

Callers

nothing calls this directly

Calls 2

CloseMethod · 0.95
NewInMemoryAuditLogFunction · 0.85

Tested by

no test coverage detected