Experiment: SQLx-based testing approach for EQL #136
+1,081 −0
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.
Overview
This is an experimental branch exploring SQLx (Rust) as an alternative testing approach for EQL, with comprehensive analysis comparing different testing frameworks.
What's Included
1. SQLx/Rust Testing Infrastructure
add_column_test.rs
demonstrating Rust+SQLx testing patternsrust-tests/run-tests.sh
2. Comprehensive Documentation
TESTING_FRAMEWORK_COMPARISON.md (597 lines)
Detailed analysis of testing approaches:
SQLX_TESTING_APPROACH.md (155 lines)
3. Example Test
rust-tests/tests/add_column_test.rs
:eql_v2.add_column()
functionKey Insights from Documentation
SQLx/Rust Approach
Pros:
Cons:
pgTAP Approach
Pros:
Cons:
Comparison to PR #135
PR #135 implements pgTAP testing with:
This PR proposes SQLx/Rust with:
Files Changed
Added:
SQLX_TESTING_APPROACH.md
- Rationale and architectureTESTING_FRAMEWORK_COMPARISON.md
- Comprehensive framework analysisrust-tests/
- Complete Rust testing infrastructureRemoved (from pgTAP PR):
tasks/test-pgtap.sh
tests/Dockerfile.pgtap
tests/install_pgtap.sql
tests/pgtap/
directoryPurpose of This PR
This is an experimental/evaluation branch meant to:
Recommendation
The documentation in this PR suggests pgTAP may be the better choice for EQL because:
However, SQLx could be valuable if:
Next Steps
Review the documentation and example code, then decide:
Related