Skip to content

Add smoke tests for Go and Rust clients - #196

Open
a-akimov wants to merge 2 commits into
modelcontextprotocol:mainfrom
a-akimov:chore/smoke-tests-go-rust-clients
Open

Add smoke tests for Go and Rust clients#196
a-akimov wants to merge 2 commits into
modelcontextprotocol:mainfrom
a-akimov:chore/smoke-tests-go-rust-clients

Conversation

@a-akimov

@a-akimov a-akimov commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Motivation and Context

We were missing smoke tests for Go and Rust MCP clients, which we need to move with confidence. This PR aims to provide the base tests, similar to what we already have for Python, TypeScript and Ruby.

Assisted with Claude Code, reviewed by me.

What was changed:

  • tests/utils.sh: the build helper took no binary name and was hardwired to the server binaries, weather for Rust and server for Go. It now takes the binary name as a second argument, so the same helper builds clients.
  • tests/smoke-test.sh: added test_mcp_client_go and test_mcp_client_rust, wired into the run list. Each builds the client, then runs it against the mock MCP server with an empty API key. The Go binary is named mcp-client-go, which the root gitignore already covers. Server tests updated to pass their binary names. Stale note removed.
  • mcp-client-rust/src/main.rs: the no-key check used is_err(), so an empty key would have started the chat loop. It now treats empty as missing, matching the Python, TypeScript, Go, and Ruby clients. This is what lets the test force the no-key path without a developer's local .env interfering.
  • tests/README.md and root README.md: coverage description updated.

How Has This Been Tested?

Locally.

Breaking Changes

No.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

N/a

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are focused, consistent with existing client behavior, and the shell scripts pass syntax validation.

Pull request overview

Adds smoke-test coverage for Go and Rust MCP clients and aligns Rust’s empty API-key behavior with other clients.

Changes:

  • Generalizes build helpers to accept binary names.
  • Adds Go and Rust client smoke tests.
  • Updates Rust API-key handling and test documentation.
File summaries
File Description
tests/utils.sh Supports configurable Go and Rust binary names.
tests/smoke-test.sh Adds Go and Rust client smoke tests.
mcp-client-rust/src/main.rs Treats an empty API key as missing.
tests/README.md Documents expanded client coverage.
README.md States that all clients are smoke-tested.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@a-akimov
a-akimov requested a review from olaservo September 9, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants