MCPcopy Create free account
hub / github.com/diillson/chatcli / TestAddRule_RejectsEmptyPattern

Function TestAddRule_RejectsEmptyPattern

cli/coder/policy_manager_test.go:77–85  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

75}
76
77func TestAddRule_RejectsEmptyPattern(t *testing.T) {
78 pm := &PolicyManager{
79 Rules: []Rule{},
80 logger: zap.NewNop(),
81 }
82 err := pm.AddRule("", ActionAllow)
83 assert.Error(t, err)
84 assert.Contains(t, err.Error(), "empty")
85}
86
87func TestAddRule_RejectsLongPattern(t *testing.T) {
88 pm := &PolicyManager{

Callers

nothing calls this directly

Calls 2

AddRuleMethod · 0.95
ErrorMethod · 0.65

Tested by

no test coverage detected