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 GDA integration tests to support both the legacy REST API and the Model Context Protocol (MCP) transport. It introduces a cloudGDATransport helper to abstract the transport layer and a cloudGDAResult struct to unify response handling. Additionally, resource cleanup throughout the tests has been modernized to use Go's t.Cleanup instead of defer, ensuring reliable teardown of mock servers, command executions, and BigQuery tables even during partial setup failures. A new test file cloud_gda_mcp_test.go has been added to explicitly validate the MCP tool endpoints and conversational analytics tools. No reviewer comments were provided, so there is no feedback to address.
Description
Migrates the cloudgda integration tests from the legacy
/apiendpoint to the MCP endpoint (/mcp), following #2922. The legacy REST tests are kept, and both transports share setup and assertions.cloud_gda_mcp_test.go: MCP tools/list + invocation for the mock-backedcloud-gda-querytool, a tools/list check for the 9 conversational analytics tools, and the list/get/ask data agent checks over MCP.startCloudGdaMockServer,setupConversationalAnalyticsTest,getConversationalAnalyticsToolsConfig) and a small REST/MCP transport, so the list/get/ask checks run against both endpoints.t.Cleanupwith boundedcontext.WithoutCancelcontexts; the ask-agent retry loop is context-aware.Testing:
TestCloudGdaToolEndpointsandTestCloudGdaMCPToolEndpoints(in-process mock gRPC server) pass locally. The conversational analytics tests need a GCP project and ID token and are verified by the CIcloudgdajob.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>