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 Firestore integration tests to support both REST and MCP transports by introducing a firestoreTransport helper and a firestoreTestData struct. It also optimizes test data setup and cleanup using Firestore's BulkWriter and t.Cleanup, and adds a new test file firestore_mcp_test.go to validate MCP tool listings and invocations. The review feedback correctly identifies a logical gap in the invokeCase helper where tests could silently pass if a tool invocation unexpectedly succeeds when an error was expected, and provides a clear code suggestion to address this issue.
c2d4071 to
c8eb674
Compare
Description
Migrates the Firestore 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.firestore_mcp_test.go: MCP tools/list for all 13 tools, the existing JSON-RPC error-path checks, and every tool invocation check over MCP.setupFirestoreTest) and a small REST/MCP transport; request bodies are nowargsmaps.t.Cleanupbefore seeding and uses a boundedcontext.WithoutCancelcontext; test documents are seeded in oneBulkWriterbatch and the client is closed on cleanup.Testing: Ran both tests locally against the Firestore emulator with dummy credentials: tools/list and 100 subtests pass on both transports.
analyzeQueryand the get/validate rules tools need real Firestore and the Firebase Rules API, so those are verified by the CIfirestorejob.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>