tests: Cover existing-user login in read-only mode#13862
Merged
Conversation
Logging in an existing user must keep working while the database is in read-only mode. When the write attempts in `save_user_to_database()` fail, it falls back to looking up the already-stored user so a returning user can still sign in during a read-only window. This path had no coverage. The test creates a user, switches the connection to read-only via `default_transaction_read_only`, and asserts a second login resolves to the same user.
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.
Logging in an existing user must keep working while the database is in read-only mode. When the write attempts in
save_user_to_database()fail, it falls back to looking up the already-stored user so a returning user can still sign in during a read-only window.This path had no coverage. The test creates a user, switches the connection to read-only via
default_transaction_read_only, and asserts a second login resolves to the same user.Related
oauth_githubfirst, then get user #13856