Skip to content

Commit 633265b

Browse files
Add tests for server tool_registry functions
Adds comprehensive tests for the previously untested registerAllTools, registerAllToolsSequential, registerAllToolsParallel, registerSysTools, registerSysTool, and callSysServer functions in internal/server/tool_registry.go. Tests cover: - DIFC enabled/disabled paths (sys tools registered only when DIFC is on) - Sequential vs parallel backend launch modes - Partial failure handling (continues when one backend fails) - All-failure resilience (returns nil, logs warnings) - Empty server list (no-op, no tools) - sys tool metadata storage via registerSysTool - callSysServer delegation to SysServer (sys_init, sys_list_servers, unknown) A newMockBackend helper provides a reusable httptest.Server that responds to initialize and tools/list requests, following the existing test patterns in register_tools_from_backend_test.go. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 972510c commit 633265b

1 file changed

Lines changed: 536 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)