Update mock tool registry tests for consistency
This commit is contained in:
parent
bfdc9734f5
commit
10f568f87e
1 changed files with 5 additions and 5 deletions
|
|
@ -764,14 +764,14 @@ func TestToolRegistry_Filter_SupportsPrefix(t *testing.T) {
|
|||
r := NewToolRegistry()
|
||||
r.Register(newMockTool("read_file", "core tool"))
|
||||
r.Register(newMockTool("write_file", "core tool"))
|
||||
r.Register(newMockTool("mcp_monday_get_items", "mcp tool"))
|
||||
r.Register(newMockTool("mcp_harvest_get_entries", "mcp tool"))
|
||||
r.Register(newMockTool("mcp_github_get_items", "mcp tool"))
|
||||
r.Register(newMockTool("mcp_google_get_entries", "mcp tool"))
|
||||
r.Register(newMockTool("tool_search_regex", "discovery tool"))
|
||||
|
||||
whitelist := []string{"read_file", "monday", "search"}
|
||||
whitelist := []string{"read_file", "github", "search"}
|
||||
r.Filter(whitelist, true)
|
||||
|
||||
// expected: read_file (exact), mcp_monday_get_items (mcp_monday_ prefix), tool_search_regex (tool_search_ prefix)
|
||||
// expected: read_file (exact), mcp_github_get_items (mcp_github_ prefix), tool_search_regex (tool_search_ prefix)
|
||||
if r.Count() != 3 {
|
||||
t.Errorf("expected 3 tools after filtering, got %d: %v", r.Count(), r.List())
|
||||
}
|
||||
|
|
@ -779,7 +779,7 @@ func TestToolRegistry_Filter_SupportsPrefix(t *testing.T) {
|
|||
allowed := r.List()
|
||||
expected := map[string]bool{
|
||||
"read_file": true,
|
||||
"mcp_monday_get_items": true,
|
||||
"mcp_github_get_items": true,
|
||||
"tool_search_regex": true,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue