test(ssh): cover host certs, accessors, debug redaction, and stable_bytes deltas#695
Conversation
…ytes deltas Adds 10 fallible tests using the existing TestResult helpers to fill coverage gaps in `uselesskey-ssh`: - host certificate path (`SshCertSpec::host`, `to_cert_type(Host)`) - empty-principals branch (`Builder::all_principals_valid`) - `SshKeyPair`/`SshCertFixture` `label()` and `spec()` accessors - `Default` impls on `SshSpec` and `SshCertType` - `Debug` redaction (no key/cert body in output) - `stable_bytes` sensitivity to validity, cert_type, critical_options, and extensions No production code changes. All new tests use `ensure!`/`ensure_eq!`/ `require_ok` so the no-panic-family check stays at zero new debt. https://claude.ai/code/session_01R9SN1o9XoVTaVxj9w4VMzD
|
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 |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
Closes coverage gaps in
uselesskey-sshidentified by manually walking the public surface againsttests/ssh_fixtures.rsand the inlinemod testsblocks. No production code changes.Gaps closed
SshCertSpec::host/to_cert_type(Host)host_cert_decodes_with_host_cert_typeBuilder::all_principals_valid(empty principals)empty_principals_yields_all_principals_validSshKeyPair::label() / spec()accessorskey_pair_accessors_report_label_and_specSshCertFixture::label() / spec()accessorscert_fixture_accessors_report_label_and_specDefaultimpls onSshSpecandSshCertTypessh_spec_default_is_ed25519SshCertType::stable_byteHost vs Userssh_cert_type_stable_byte_distinguishes_variantsSshKeyPair/SshCertFixtureDebugimplkey_pair_debug_omits_key_material,cert_fixture_debug_omits_key_materialSshCertSpec::stable_bytessensitivitycert_spec_stable_bytes_change_with_critical_options_and_extensions,cert_spec_stable_bytes_change_with_validity_and_cert_type10 new tests, all using
TestResult+ensure!/ensure_eq!/require_okso the no-panic-family check stays at zero new debt.Test plan
cargo test -p uselesskey-ssh --tests— 13/13 pass (10 new + 3 existing)cargo clippy -p uselesskey-ssh --tests --all-features -- -D warningscargo xtask check-no-panic-family— only the pre-existingxtask/src/user_path_smoke.rs:126debt remains, no new debt from this branchcargo fmt --check -p uselesskey-sshhttps://claude.ai/code/session_01R9SN1o9XoVTaVxj9w4VMzD
Generated by Claude Code