Skip to content

test(test-server): cover spec builders, phase accessors, and error variants#710

Merged
EffortlessSteven merged 1 commit into
mainfrom
claude/coverage-test-server-Xmgd3
May 16, 2026
Merged

test(test-server): cover spec builders, phase accessors, and error variants#710
EffortlessSteven merged 1 commit into
mainfrom
claude/coverage-test-server-Xmgd3

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Adds 12 integration tests to uselesskey-test-server to close coverage gaps on
spec 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.rs and
follow the workspace no-panic-family policy (return TestResult<()>, use
require_ok / require_some / ensure! / ensure_eq! from
uselesskey-test-support — no .unwrap() / .expect()).

Coverage added

  • 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 with_phase, and 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 to the live port
  • From<RsaJwkKeySpec> for JwkFixtureSpec — round-trip conversion preserves label and spec
  • Error Display / Debug — instantiates each variant and checks message + variant name
  • EmptyPhaseSequence — starting with an empty Sequence returns the right error variant

Crate plumbing

  • Adds uselesskey-test-support to [dev-dependencies] of uselesskey-test-server (already in workspace).

Test plan

  • cargo test -p uselesskey-test-server — 6 inline + 12 new tests pass
  • cargo clippy -p uselesskey-test-server --all-targets -- -D warnings — clean
  • cargo fmt -p uselesskey-test-server — clean

https://claude.ai/code/session_TODO


Generated by Claude Code

…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>
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@EffortlessSteven has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 25 minutes and 50 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: df97176b-b7d2-4541-9777-22335843590e

📥 Commits

Reviewing files that changed from the base of the PR and between 5be9464 and 053ad9a.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • crates/uselesskey-test-server/Cargo.toml
  • crates/uselesskey-test-server/tests/spec_accessors.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/coverage-test-server-Xmgd3

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@EffortlessSteven EffortlessSteven marked this pull request as ready for review May 16, 2026 07:46
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@EffortlessSteven EffortlessSteven merged commit 25021ac into main May 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants