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

Function TestBasicPolicyEngine_GetPolicy_NotFound

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

Source from the content-addressed store, hash-verified

117}
118
119func TestBasicPolicyEngine_GetPolicy_NotFound(t *testing.T) {
120 engine := NewBasicPolicyEngine(nil, &mockAuditLog{})
121
122 _, err := engine.GetPolicy("nonexistent")
123 if err == nil {
124 t.Error("expected error for nonexistent policy, got nil")
125 }
126}
127
128func TestBasicPolicyEngine_ListPolicies(t *testing.T) {
129 engine := NewBasicPolicyEngine(nil, &mockAuditLog{})

Callers

nothing calls this directly

Calls 3

GetPolicyMethod · 0.95
NewBasicPolicyEngineFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected