test(test-server): cover spec builders, phase accessors, and error variants#710
Conversation
…riants
- CachePolicySpec::no_store() — verifies max_age_seconds: 0 and emit_etag: false
- JwksSpec::single_ecdsa / single_ed25519 — single-key construction parity with single_rsa
- OidcServerSpec::localhost_static — discovery/jwks defaults + static rotation shape
- TestServerHandle::active_phase_name — initial + after switching + static rotation case
- with_phase("unknown") — returns Error::UnknownPhase and leaves the active phase intact
- IssuerUrlMode::Fixed — discovery document advertises the fixed issuer while jwks_uri stays bound
- From<RsaJwkKeySpec> for JwkFixtureSpec — round-trip conversion preserves label and spec
- Error Display/Debug — instantiates each variant and checks message + variant name
- EmptyPhaseSequence — start with empty Sequence returns the right error variant
Adds uselesskey-test-support as a dev-dep and uses TestResult/require_ok/ensure
to comply with the workspace no-panic-family policy (no .unwrap()/.expect()).
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
Adds 12 integration tests to
uselesskey-test-serverto close coverage gaps onspec builders, phase accessors, error variants, and issuer-URL modes. No
production code changes — tests only.
New tests live in
crates/uselesskey-test-server/tests/spec_accessors.rsandfollow the workspace no-panic-family policy (return
TestResult<()>, userequire_ok/require_some/ensure!/ensure_eq!fromuselesskey-test-support— no.unwrap()/.expect()).Coverage added
CachePolicySpec::no_store()— verifiesmax_age_seconds: 0andemit_etag: falseJwksSpec::single_ecdsa/single_ed25519— single-key construction parity withsingle_rsaOidcServerSpec::localhost_static— discovery / jwks defaults + static rotation shapeTestServerHandle::active_phase_name— initial, afterwith_phase, and static-rotation casewith_phase("unknown")— returnsError::UnknownPhaseand leaves the active phase intactIssuerUrlMode::Fixed— discovery document advertises the fixed issuer whilejwks_uristays bound to the live portFrom<RsaJwkKeySpec> for JwkFixtureSpec— round-trip conversion preserves label and specErrorDisplay/Debug— instantiates each variant and checks message + variant nameEmptyPhaseSequence— starting with an emptySequencereturns the right error variantCrate plumbing
uselesskey-test-supportto[dev-dependencies]ofuselesskey-test-server(already in workspace).Test plan
cargo test -p uselesskey-test-server— 6 inline + 12 new tests passcargo clippy -p uselesskey-test-server --all-targets -- -D warnings— cleancargo fmt -p uselesskey-test-server— cleanhttps://claude.ai/code/session_TODO
Generated by Claude Code