Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions internal/mcp/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ func TestDispatch_UnknownMethod(t *testing.T) {
_, rpcErr := s.dispatch(context.Background(), "unknown/method", nil)
if rpcErr == nil {
t.Fatal("expected rpcError for unknown method")
return
}
if rpcErr.Code != codeMethodNotFound {
t.Errorf("expected codeMethodNotFound (%d), got %d", codeMethodNotFound, rpcErr.Code)
Expand All @@ -325,6 +326,7 @@ func TestDispatch_ToolsCall_UnknownTool(t *testing.T) {
_, rpcErr := s.dispatch(context.Background(), "tools/call", params)
if rpcErr == nil {
t.Fatal("expected rpcError for unknown tool name in tools/call")
return
}
if rpcErr.Code != codeInternalError {
t.Errorf("expected codeInternalError (%d), got %d", codeInternalError, rpcErr.Code)
Expand Down Expand Up @@ -566,6 +568,7 @@ func TestHandleToolCall_ParseError(t *testing.T) {
_, rpcErr := s.handleToolCall(context.Background(), badParams)
if rpcErr == nil {
t.Fatal("expected rpcError for invalid params JSON")
return
}
if rpcErr.Code != codeParseError {
t.Errorf("expected codeParseError (%d), got %d", codeParseError, rpcErr.Code)
Expand Down
Loading