Repository navigation
Conversation
|
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. |
There was a problem hiding this comment.
Code Review
This pull request refactors the Cloud Storage integration tests to support both REST and Model Context Protocol (MCP) transports. It introduces a cloudStorageTransport abstraction to handle starting the server and invoking tools over both protocols, and migrates test payloads from raw JSON strings to structured maps. Additionally, a new test file cloud_storage_mcp_test.go is added to explicitly verify the MCP tool manifests and run the integration tests over MCP. Cleanups are also improved by utilizing t.Cleanup and detaching the cleanup context from the potentially cancelled test context. I have no feedback to provide as there are no review comments.
33b2eb7 to
4c49f26
Compare
Description
Migrates the Cloud Storage integration tests from the legacy
/apiendpoint to the MCP endpoint (/mcp), following #2922. The legacy REST test is kept, and both transports share setup and assertions.cloud_storage_mcp_test.go: MCP tools/list for all 27 tools (including the configured variants, whose baked-in parameters are dropped from the schema) and every tool invocation check over MCP.setupCloudStorageTest) and a REST/MCPinvokeTool; request bodies are nowargsmaps.t.Cleanupbefore the bucket is created and uses a boundedcontext.WithoutCancelcontext; seed objects are written from one table and the client is closed on cleanup.Testing: Ran both tests locally against
fake-gcs-server: tools/list and 187 subtests pass on both transports. Bucket IAM policy,objects.move, and bucket location/uniform-access settings aren't supported by the emulator, so those are verified by the CIcloud-storagejob.PR Checklist
CONTRIBUTING.md
bug/issue
before writing your code! That way we can discuss the change, evaluate
designs, and agree on the general idea
review
!if this involve a breaking change🛠️ Fixes #<issue_number_goes_here>