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

Function TestRunBuiltinTool_Guards

cli/rpc_support_test.go:51–59  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

49}
50
51func TestRunBuiltinTool_Guards(t *testing.T) {
52 c := &ChatCLI{} // no plugin manager
53 if _, err := c.RunBuiltinTool(context.Background(), "read", "x"); err == nil {
54 t.Error("expected error when plugins unavailable")
55 }
56 if tools := c.ListBuiltinTools(); tools != nil {
57 t.Errorf("expected nil tools without a plugin manager, got %v", tools)
58 }
59}
60
61func TestBuiltinTools_WithManager(t *testing.T) {
62 mgr, err := plugins.NewManager(zap.NewNop())

Callers

nothing calls this directly

Calls 4

RunBuiltinToolMethod · 0.95
ListBuiltinToolsMethod · 0.95
ErrorfMethod · 0.80
ErrorMethod · 0.65

Tested by

no test coverage detected