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 FalkorDB integration tests by extracting setup helpers and test cases into reusable functions. It also introduces a new integration test suite in tests/falkordb/falkordb_mcp_test.go to verify the FalkorDB Model Context Protocol (MCP) server, reusing the extracted test cases to validate tool listing and invocation. There are no review comments, so I have no feedback to provide.
|
/gcbrun |
3e77079 to
2f1e16e
Compare
Description
This PR migrates the FalkorDB integration tests to use the /mcp endpoint on the MCP Toolbox Server.
Key Changes
falkordb_mcp_test.go: Migrated legacy/apitests to/mcpTestFalkorDBMCPListToolsvalidates the fulltools/listmanifest for all eight FalkorDB tools configured in the test (falkordb-cypher,falkordb-execute-cypherincluding the read-only and graph-override variants,falkordb-schema, andfalkordb-list-graphs).TestFalkorDBMCPCallToolruns the same ten invocation cases as the legacy test over MCP JSON-RPC: parameterized cypher, ad-hoc execution (write stats,dry_runquery plan, graph override), schema extraction on populated and nonexistent graphs, and graph listing.wantContentErrandAssertMCPError.t.Cleanupfor server andcmd.Closecleanup.falkordb_integration_test.go: Extracted shared helpers so the legacy and MCP tests use the same setup and cases (no behavior change to the legacy test):setupFalkorDBInstancestarts the ephemeral FalkorDB container (unlessFALKORDB_*points at an external instance) and restores the package-level connection variables on cleanup, so each test gets its own container.getFalkorDBToolsConfigbuilds the shared tools file.getFalkorDBInvokeTestCasesholds the shared invocation cases (toolName+args map[string]any), replacing the inlinerequestBodyJSON strings.No shared test helpers (
tests/tool.go,tests/mcp_tool.go,tests/option.go) are modified. The legacy/apiFalkorDB test is kept.Verified locally against the
falkordb/falkordb:v4.18.0testcontainer:go test -count=1 -v ./tests/falkordb/passes (legacy REST test, MCPtools/list, and all MCP invocations).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>