Repository navigation
refactor(auth): tests share one way to send requests and read replies - #574
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 43 minutes. View limit details
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. |
PiquelChips
force-pushed
the
refactor/544-tests-requests
branch
2 times, most recently
from
November 20, 2026 09:00
edbbd5d to
4b7ce55
Compare
PiquelChips
marked this pull request as ready for review
November 20, 2026 10:13
PiquelChips
force-pushed
the
refactor/544-tests-sign-in
branch
from
November 20, 2026 13:56
51fe7d1 to
5c9a78d
Compare
PiquelChips
force-pushed
the
refactor/544-tests-requests
branch
from
November 20, 2026 13:56
4b7ce55 to
2f7acba
Compare
PiquelChips
force-pushed
the
refactor/544-tests-sign-in
branch
from
November 20, 2026 14:12
5c9a78d to
d47cd4b
Compare
PiquelChips
force-pushed
the
refactor/544-tests-requests
branch
from
November 20, 2026 14:12
2f7acba to
444c8c7
Compare
PiquelChips
force-pushed
the
refactor/544-tests-sign-in
branch
from
November 20, 2026 15:02
d47cd4b to
93f2765
Compare
PiquelChips
force-pushed
the
refactor/544-tests-requests
branch
from
November 20, 2026 15:16
444c8c7 to
1dd02c8
Compare
PiquelChips
force-pushed
the
refactor/544-tests-sign-in
branch
from
November 21, 2026 13:06
93f2765 to
f1517e4
Compare
…registry uses json
PiquelChips
force-pushed
the
refactor/544-tests-requests
branch
from
November 21, 2026 13:23
1dd02c8 to
0ce3e09
Compare
PiquelChips
enabled auto-merge
November 21, 2026 13:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #544. Builds on #571 and #573 (merged).
Test modules kept their own copies of request code that
crate::testsalready has, or should have:Accounttype, request builder and body reader, copies ofBrowser's. It now usesBrowser. The newBrowser::send_fromsends from a request context of the test's own, andBrowser::sendcalls it.html,jsonandreplyshare one private body reader. The OIDCFlow::json/Flow::textand passkeyFixture::jsonare gone, and the clients registry tests read the token endpoint's error withjsontoo.EventRepository::known_historyfixture (added tocrates/database/src/fixtures.rshere, with its first callers) instead of writing out "this account's known events, newest first".deletion/tests.rsdrops its copy ofcrate::tests::reason.Differences
No test reads any of these:
MAX_RESPONSE_BYTES(256 KiB), asBrowser::calland the page tests already did. OIDC'sFlow::jsonandFlow::textread up to 1 MiB. Passkey'sFixture::jsonand the registry reader read up to 64 KiB. No response comes near any of these limits, and none is an assertion. The readers' panic messages change with them.Browser::signed_out(), with an emptyCookieheader instead of none, as every other signed-out test does. The service reads an empty header as no cookie.Unchanged
origin/main.crates/database/src/fixtures.rs(forknown_history) anddocs/dev/testing.md(naming the shared readers) change.Checks
cargo clippy -p auth-serviceand-p sourceorigin-repository,--all-targets, pass with and without--all-features,-D warnings.just docspasses.just db teston the latestmain: all 499 tests pass, and the query cache check passes.known_historycomes before its first callers.Council review
Rounds: 2
Round 2 found no code defects. Its should-fixes were these descriptions, and its nits are applied.
Note
Written by Claude Opus 5.5 in Claude Code and reviewed by GPT 6.1 Sol, Claude Opus 5.5 and Claude Fable 5.2 (via T3 Code)