-
Notifications
You must be signed in to change notification settings - Fork 2
Port test infrastructure to backend-agnostic APIs (Phase 3) #2388
Copy link
Copy link
Closed
Labels
P2High value, medium complexityHigh value, medium complexityenhancementNew feature or requestNew feature or request
Description
Parent epic: #2385
Problem
Several test modules use sqlite-specific APIs directly, preventing the test suite from running against PostgreSQL:
crates/zeph-memory/src/graph/store/tests.rs:869—use sqlx::sqlite::SqliteConnectOptionscrates/zeph-index/src/watcher.rs:80—sqlx::SqlitePool::connect("sqlite::memory:")crates/zeph-scheduler/src/scheduler.rs:377—sqlx::SqlitePool::connect("sqlite::memory:")crates/zeph-memory/src/store/mod.rs:98,113— sqlite-specific PRAGMAs in tests
Required Changes
- Replace all
sqlx::SqlitePool::connect("sqlite::memory:")withzeph_db::DbConfig { url: ":memory:".into(), .. }.connect().await - Replace
SqliteConnectOptionsusage withzeph-dbpool creation - Gate sqlite-specific test assertions (PRAGMAs) behind
#[cfg(feature = "sqlite")] - Add testcontainers-based postgres test support to consumer crates that need it
- Add CI matrix: run workspace tests with both
--features sqliteand--features postgres
Acceptance Criteria
cargo nextest run --features postgrespasses all non-ignored tests- CI runs tests against both backends
- No
sqlx::sqlite::*imports outsidezeph-db
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2High value, medium complexityHigh value, medium complexityenhancementNew feature or requestNew feature or request