Visitar URL original
test(source/dataproc): migrate integration tests to MCP endpoint by DylanVolz · Pull Request #4199 · googleapis/mcp-toolbox · GitHub
Skip to content

test(source/dataproc): migrate integration tests to MCP endpoint - #4199

Open
DylanVolz wants to merge 1 commit into
googleapis:mainfrom
DylanVolz:chore/dataproc-mcp-migration
Open

DylanVolz wants to merge 1 commit into
googleapis:mainfrom
DylanVolz:chore/dataproc-mcp-migration

Conversation

@DylanVolz

Copy link
Copy Markdown

Description

This PR migrates the Dataproc integration tests to use the /mcp endpoint on the MCP
Toolbox Server.

Key Changes

  • dataproc_mcp_test.go: adds TestDataprocMCPListTools (validates the tools/list manifest) and TestDataprocClustersMCPToolEndpoints (runs the same cluster and job checks as the legacy test over MCP, including auth: 200 with a valid token, 401 with an invalid or missing token; error cases are asserted as MCP error results).
  • dataproc_integration_test.go: replaces invokeTool with a small REST/MCP transport so both tests run the same checks; the legacy assertions are unchanged.
  • Cleanup hardening: Dataproc clients and the server are cleaned up with t.Cleanup, and REST requests use the test context.

Testing

go vet passes. The integration tests need Google Cloud credentials and existing clusters and jobs, so they will first run in CI via the dataproc shard.

PR Checklist

Thank you for opening a Pull Request! Before submitting your PR, there are a
few things you can do to make sure it goes smoothly:

  • Make sure you reviewed
    CONTRIBUTING.md
  • Make sure to open an issue as a
    bug/issue
    before writing your code! That way we can discuss the change, evaluate
    designs, and agree on the general idea
  • Ensure you have manually reviewed the entire diff before requesting a
    review
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)
  • Make sure to add ! if this involve a breaking change

🛠️ Fixes #<issue_number_goes_here>

@DylanVolz
DylanVolz requested a review from a team as a code owner September 30, 2026 16:51
@google-cla

google-cla Bot commented Sep 30, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for Model Context Protocol (MCP) transport in Dataproc integration tests. It refactors the existing test suite by creating a dataprocTransport abstraction to handle both legacy REST API and MCP-based tool invocations, and updates test methods to utilize this new transport. Additionally, a new test file tests/dataproc/dataproc_mcp_test.go has been added to verify MCP tool registry and endpoint functionality. I have no feedback to provide.

This branch has not been deployed

No deployments
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