test: migrate API and MCP e2e to multi-db#189
Merged
mergify[bot] merged 3 commits intomatrixorigin:mainfrom Apr 17, 2026
Merged
test: migrate API and MCP e2e to multi-db#189mergify[bot] merged 3 commits intomatrixorigin:mainfrom
mergify[bot] merged 3 commits intomatrixorigin:mainfrom
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR migrates the API and MCP end-to-end test suites to a shared multi-database test harness, adds reusable helpers for multi-db test setup/teardown, and adjusts API/storage behavior uncovered during multi-db validation.
Changes:
- Introduce a reusable
MultiDbTestContextharness (shared DB + routed user DBs) and wire MCP/API integration tests to use it. - Update storage/runtime SQL and ordering assumptions for multi-db correctness (including quoting reserved identifiers).
- Add a
make test-e2e-mcptarget to run MCP E2E suites consistently against the test DB.
Reviewed changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| memoria/crates/memoria-test-utils/src/lib.rs | Adds MultiDbTestContext + DB URL helpers and cleanup logic for multi-db tests. |
| memoria/crates/memoria-test-utils/Cargo.toml | Adds dependencies needed by the new multi-db test harness. |
| memoria/crates/memoria-storage/src/store.rs | Adjusts governance SQL (task quoting) and changes lite listing sort order. |
| memoria/crates/memoria-mcp/tests/support/multi_db.rs | New MCP test wrapper around MultiDbTestContext. |
| memoria/crates/memoria-mcp/tests/support/mod.rs | Exposes MCP test support module. |
| memoria/crates/memoria-mcp/tests/snapshot_e2e.rs | Migrates snapshot E2E to multi-db harness and fixes per-user snapshot expectations. |
| memoria/crates/memoria-mcp/tests/perf_optimizations_e2e.rs | Migrates perf tests to multi-db harness and uses per-user qualified table names. |
| memoria/crates/memoria-mcp/tests/mcp_e2e.rs | Migrates MCP tool E2E tests to multi-db harness. |
| memoria/crates/memoria-mcp/tests/integration_full.rs | Migrates full-stack MCP integration test to multi-db harness and per-user pools. |
| memoria/crates/memoria-mcp/tests/graph_e2e.rs | Migrates Graph E2E tests to multi-db harness and per-user stores/pools. |
| memoria/crates/memoria-mcp/tests/feedback_e2e.rs | Migrates feedback E2E tests to multi-db harness; adds mock-embedder setup helper. |
| memoria/crates/memoria-mcp/tests/edit_log_e2e.rs | Migrates edit-log E2E suite (including API-spawned server) to multi-db harness. |
| memoria/crates/memoria-mcp/tests/core_tools_e2e.rs | Migrates core tools E2E suite to multi-db harness; updates get usage to get_for_user. |
| memoria/crates/memoria-mcp/tests/branch_e2e.rs | Migrates branch E2E suite to multi-db harness and updates direct SQL/git assertions. |
| memoria/crates/memoria-api/tests/support/multi_db.rs | Adds API test server harness built on MultiDbTestContext (spawn + shutdown). |
| memoria/crates/memoria-api/tests/support/mod.rs | Exposes API test support module. |
| memoria/crates/memoria-api/tests/pool_isolation.rs | Updates pool isolation test to use multi-db API server harness and routed pools. |
| memoria/crates/memoria-api/tests/api_db_verify.rs | Migrates API DB verification tests to multi-db API server harness and per-user pools. |
| memoria/crates/memoria-api/src/routes/memory.rs | Adds cross-user lookup helper for memory operations in multi-db setups. |
| memoria/crates/memoria-api/src/routes/admin.rs | Extends global hygiene endpoint to aggregate per-user hygiene in multi-db mode. |
| memoria/Cargo.lock | Updates lockfile for new test-utils dependencies. |
| Makefile | Adds test-e2e-mcp make target to run MCP E2E suites. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
XuPeng-SH
approved these changes
Apr 17, 2026
Merge Queue Status
This pull request spent 8 seconds in the queue, including 1 second running CI. Required conditions to merge
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation