Skip to content

Commit 0e53726

Browse files
committed
feat(testing): add SQLx/Rust test framework infrastructure
Add comprehensive Rust/SQLx testing infrastructure to replace pgTAP: **Core Framework:** - Create tests/sqlx crate with fluent assertion API - Add selector constants to eliminate magic string literals - Implement query assertion builder for ergonomic test writing **Test Infrastructure:** - Add SQLx migrations for EQL installation and test helpers - Add SQL fixtures for test data seeding - Configure Cargo workspace integration **Tooling & Scripts:** - Add mise tasks for test execution and coverage tracking - Add assertion counting and comparison tools - Add function call tracking for coverage analysis - Add test inventory generator - Add master coverage check script **Configuration:** - Update Docker Compose with track_functions enabled - Add generated migration files to gitignore - Update mise.toml with Rust test tasks **Migration:** - Remove pgTAP testing infrastructure (Dockerfile, tests, scripts) - Add SQL-to-SQLx migration guide documentation - Add assertion count and test inventory docs This infrastructure enables writing Rust tests with SQLx queries instead of pgTAP, providing better IDE support, type safety, and debugging.
1 parent 134b664 commit 0e53726

38 files changed

+5504
-480
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,4 +206,7 @@ release/
206206
__pycache__
207207

208208
# dbdev
209-
eql--*.sql
209+
eql--*.sql
210+
211+
# Generated SQLx migration (built from src/, never commit)
212+
tests/sqlx/migrations/001_install_eql.sql

0 commit comments

Comments
 (0)