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

Function TestKnowledgePlugin_NoAdapter

cli/plugins/builtin_knowledge_test.go:154–161  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

152}
153
154func TestKnowledgePlugin_NoAdapter(t *testing.T) {
155 SetKnowledgeAdapter(nil)
156 t.Cleanup(func() { SetKnowledgeAdapter(nil) })
157 p := NewBuiltinKnowledgePlugin()
158 if _, err := p.Execute(context.Background(), []string{`{"cmd":"list"}`}); err == nil {
159 t.Fatal("missing adapter must error, not panic")
160 }
161}
162
163func TestKnowledgePlugin_Capabilities(t *testing.T) {
164 p := NewBuiltinKnowledgePlugin()

Callers

nothing calls this directly

Calls 4

ExecuteMethod · 0.95
SetKnowledgeAdapterFunction · 0.85
CleanupMethod · 0.45

Tested by

no test coverage detected