feat: add uts for mcpgo and toolsets pkgs#13
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive unit tests for the mcpgo and toolsets packages to improve test coverage and validate expected behaviors.
- Added new unit tests for toolset management and enabling logic in pkg/toolsets.
- Introduced tests for JSON, text, and error outputs in tool results under pkg/mcpgo.
- Expanded server tests, including stdio server creation and tool conversion validations, in pkg/mcpgo.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/toolsets/toolsets_test.go | Tests validating toolset group functionality and behavior. |
| pkg/mcpgo/tool_test.go | Unit tests for various tool result outputs including JSON. |
| pkg/mcpgo/stdio_test.go | Tests for stdio server creation and invalid server error cases. |
| pkg/mcpgo/stdio.go | Refactored NewStdioServer to return a TransportServer interface. |
| pkg/mcpgo/server_test.go | Comprehensive tests covering server creation, tool conversion, and option setter behavior. |
stuckinforloop
left a comment
There was a problem hiding this comment.
Overall LGTM. I think we can remove tests for mcpgo pkg. In case we are keeping them, seems good to me.
| @@ -0,0 +1,323 @@ | |||
| package mcpgo | |||
There was a problem hiding this comment.
are these tests for mcpgo pkg required given those are already tested in the mark3labs/mcp-go pkg
There was a problem hiding this comment.
Since we're implementing a wrapper around our functional handler, we should ensure it's properly tested—this was something that got missed when we wrote unit tests for our tools earlier.
Additionally, the definition of tool parameters within the schema should also be covered by tests, as it directly impacts the structure consumed by the LLM.
…into chiragchiranjib/add-mcpgo-uts
Description
Add uts for mcpgo and toolsets packages.
Type of Change
Testing
Checklist