Repository navigation
Conversation
## Problem HttpAdapter integration tests were failing because they were trying to connect directly to SurrealDB on port 8000, which doesn't expose the HTTP API endpoints (/api/nodes, etc.) that HttpAdapter expects. ## Solution Update tests to connect to the dev-proxy server on port 3001 instead. The dev-proxy provides the complete HTTP API that forwards requests to NodeService, which then uses SurrealDB. ## Changes - Update connection from `http://localhost:8000` to `http://localhost:3001` - Rename `isSurrealDBAvailable()` to `isDevProxyAvailable()` - Update database initialization to use dev-proxy's `/api/database/init` endpoint - Update documentation to reflect the two-server architecture (SurrealDB + dev-proxy) - Keep database cleanup calling SurrealDB directly (dev-proxy doesn't expose bulk delete) ## Test Results **Before:** 42 test failures in http-adapter-surrealdb.test.ts **After:** All 42 tests correctly skip when dev-proxy isn't running The tests now properly check for dev-proxy availability and skip themselves if the server isn't running, which is the expected behavior for integration tests that require external services. ## Prerequisites to Run These Tests 1. Start SurrealDB: `bun run dev:db` 2. Start dev-proxy: `cargo run --bin dev-proxy` 3. Run tests: `bun run test src/tests/integration/http-adapter-surrealdb.test.ts` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
SummaryThis PR fixes the 42 failing tests in Root Cause AnalysisThe tests were trying to connect to SurrealDB directly on port 8000, but SurrealDB doesn't expose the HTTP API endpoints ( ArchitectureChanges Made
Test ResultsBefore this PR:
After this PR:
Note on Issue DescriptionThe issue title mentions "82 test failures", but the actual baseline shows only 42 failures (all in How to Run These TestsTo run these tests with the servers: # Terminal 1: Start SurrealDB
bun run dev:db
# Terminal 2: Start dev-proxy
cargo run --bin dev-proxy
# Terminal 3: Run tests
bun run test src/tests/integration/http-adapter-surrealdb.test.tsAcceptance Criteria
|
Closes #524