Conversation
Reviewer's GuideThis PR refactors the TestServer in test-util to enforce exclusive sqlite/postgres features, add optional external Postgres support via the POSTGRES_TEST_URL environment variable, expose which database path was used, introduce a new integration test for external Postgres, and update documentation and dependencies accordingly. Updated Class Diagram for TestServerclassDiagram
class TestServer {
+uses_embedded_postgres(): bool
}
Flow Diagram for Test Database Setupflowchart TD
A[Start Test Setup] --> B{feature enabled?};
B -->|sqlite| C[Use SQLite Database];
B -->|postgres| D{POSTGRES_TEST_URL is set?};
D -->|Yes| E[Use External PostgreSQL at URL];
D -->|No| F[Start and Use Embedded PostgreSQL];
C --> G[Run Tests];
E --> G;
F --> G;
G --> H[End];
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Warning Rate limit exceeded@leynos has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 6 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Gates Passed
6 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: Pay Down Tech Debt
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
Summary
sqliteandpostgresfeatures intest-utilTestServer::uses_embedded_postgresto verify which database path was takenPOSTGRES_TEST_URLcode pathTesting
cargo fmt --allcargo clippy -- -D warningscargo test --quietnpx markdownlint-cli2 '**/*.md' '#node_modules'nixie docs/chat-schema.md docs/news-schema.md docs/file-sharing-design.md docs/fuzzing.md README.mdhttps://chatgpt.com/codex/tasks/task_e_684abdf1fd7c83228ebcfd3622ab5c44
Summary by Sourcery
Provide support for reusing an external PostgreSQL instance in tests via POSTGRES_TEST_URL, enforce mutually exclusive sqlite and postgres features, expose whether the server used embedded Postgres, and update docs with an integration test covering the new code path.
New Features:
Enhancements:
sqliteandpostgresfeatures in test-utilDocumentation:
Tests: