Skip to content

tests: Cover existing-user login in read-only mode#13862

Merged
Turbo87 merged 1 commit into
rust-lang:mainfrom
Turbo87:read-only-login-test
Jun 5, 2026
Merged

tests: Cover existing-user login in read-only mode#13862
Turbo87 merged 1 commit into
rust-lang:mainfrom
Turbo87:read-only-login-test

Conversation

@Turbo87
Copy link
Copy Markdown
Member

@Turbo87 Turbo87 commented Jun 5, 2026

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

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.
@Turbo87 Turbo87 added the C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear label Jun 5, 2026
@Turbo87 Turbo87 merged commit 02782d7 into rust-lang:main Jun 5, 2026
12 checks passed
@Turbo87 Turbo87 deleted the read-only-login-test branch June 5, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-backend ⚙️ C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants