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

Function TestNewBasicPolicyEngine

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

Source from the content-addressed store, hash-verified

7)
8
9func TestNewBasicPolicyEngine(t *testing.T) {
10 engine := NewBasicPolicyEngine(nil, &mockAuditLog{})
11
12 if engine == nil {
13 t.Fatal("expected BasicPolicyEngine, got nil")
14 }
15
16 if engine.config.EnableCaching != true {
17 t.Error("expected EnableCaching to be true by default")
18 }
19}
20
21func TestBasicPolicyEngine_AddPolicy(t *testing.T) {
22 engine := NewBasicPolicyEngine(nil, &mockAuditLog{})

Callers

nothing calls this directly

Calls 2

NewBasicPolicyEngineFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected