test(rustls): cover default-provider mTLS config builders#712
Conversation
- Add inline tests pinning X509Chain::server_config_mtls_rustls() and X509Chain::client_config_mtls_rustls() — the default-provider mTLS variants were previously only exercised through cross-crate integration tests. - Add a default-provider mTLS handshake roundtrip to lock in that a pair of default-provider mTLS configs interoperate without an explicit CryptoProvider argument. - Use uselesskey-test-support TestResult/ensure!/require_ok helpers so the new tests add zero panic-family debt (verified via `cargo xtask check-no-panic-family`: 0 new-debt). - Add uselesskey-test-support to dev-dependencies. https://claude.ai/code/session_TODO Co-authored-by: Claude <noreply@anthropic.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ 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. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
Tests-only PR closing a coverage gap in
crates/uselesskey-rustls/src/config.rs. The non-mTLS default-provider builders (server_config_rustls,client_config_rustls) were already inline-tested, but the default-provider mTLS variants onX509Chainhad no direct inline coverage — they were only exercised indirectly through workspace-level integration tests.The four public-config-method punchlist items from the task brief (
X509Chain/X509Certserver_config_rustls/client_config_rustls) turned out to already have inline tests onorigin/main, so this PR pivots to the genuinely-uncovered surface:RustlsMtlsExt::{server_config_mtls_rustls, client_config_mtls_rustls}forX509Chain.server_config_mtls_from_chain_default_provider— builds the default-provider mTLSServerConfigand sanity-checks a known default.client_config_mtls_from_chain_default_provider— builds the default-provider mTLSClientConfigand sanity-checks a known default.mtls_default_provider_pair_completes_handshake— drives a full mTLS handshake between a default-provider server and client to lock in interop without an explicitCryptoProviderargument.All three new tests use
uselesskey-test-support'sTestResult/ensure!/require_okhelpers and returnTestResult<()>, so they add zero panic-family debt (cargo xtask check-no-panic-familyreports0 new-debt).uselesskey-test-supportwas added todev-dependencies.Test plan
cargo test -p uselesskey-rustls --all-features(24 lib tests pass; previously 21 with--all-features)cargo clippy -p uselesskey-rustls --all-targets --all-features -- -D warningscleancargo fmt -p uselesskey-rustlscleancargo xtask check-no-panic-family—0 new-debthttps://claude.ai/code/session_TODO
Generated by Claude Code