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 Logging Admin integration tests to support both the legacy REST API and the Model Context Protocol (MCP). It extracts setup and teardown logic into helper functions using t.Cleanup for safer resource management, introduces a unified logAdminTransport to abstract tool invocation across REST and MCP, and adds a new test suite (cloud_logging_admin_mcp_test.go) specifically for validating MCP tool listings and endpoints. No review comments were provided, so there is no feedback to address.
|
/gcbrun |
| }) | ||
| } | ||
|
|
||
| func TestLogAdminMCPToolEndpoints(t *testing.T) { |
There was a problem hiding this comment.
nit: Change name to match existing format of Test<Source>MCPCallTool
Description
This PR migrates the Cloud Logging Admin integration tests to use the /mcp endpoint on the MCP Toolbox Server.
Key Changes
cloud_logging_admin_mcp_test.go: addsTestLogAdminMCPListTools(validates thetools/listmanifest) andTestLogAdminMCPToolEndpoints(runs the same checks as the legacy test over MCP, including auth: 401 without a token, and theinvalid-filter case asserted as an MCP error result). -
cloud_logging_admin_integration_test.go: extracts shared setup and a smallREST/MCP transport so both tests run the same checks; the legacy assertions are unchanged.
Testing
go vetand the existing helper unit tests pass locally. The integration tests need Google Cloud credentials, so they will first run in CI via thecloud-logging-adminshard.> Should include a concise description of the changes (bug or feature), it'sPR 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>