-
Notifications
You must be signed in to change notification settings - Fork 0
Integration tests: MCP STDIO end-to-end with temp DB #5
Copy link
Copy link
Closed
Description
Description
Add integration tests that exercise the full MCP STDIO pipeline end-to-end:
spawn the proxy (index.js) via a PTY, send JSON-RPC messages, and validate responses.
Requirements
-
Temp DB isolation — Add
VECTOR_MEMORY_DATA_DIRenv var override to
vector-memory-server.jsso tests can point at a temp directory instead
of~/.copilot/. Delete the temp dir after tests. -
PTY wrapper — Use
node-pty(or similar) to spawnindex.jsand
interact via MCP JSON-RPC over stdin/stdout. -
Test cases (positive + negative):
vector_searchwith a valid query → returns results arrayvector_searchwith missing query param → returns errorvector_reindex→ returns counttools/list→ lists both tools with correct schemas- Initialize handshake completes successfully
-
Cleanup — Temp DB directory is removed after test run.
Notes
- The three HTTP endpoints on the server are
/ping,/search,/reindex - The proxy forwards MCP tool calls to the HTTP server via
callServerWithRetry() - DB paths are currently hardcoded in
vector-memory-server.js:17-19
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels