GRI-2153: fail-first tests for self-service password change #290
No reviewers
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!290
Loading…
Reference in a new issue
No description provided.
Delete branch "test/GRI-2153-self-service-password-change"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fail-first tests for the self-service password change in #231.
No specification exists past the issue's own text — "current password, new
password twice" — so the exact wire contract is a decision this PR makes
explicit rather than invents silently. It assumes:
PATCH /api/v1/session/password, bodycurrent_password,new_password,new_password_confirmation— the same self-service shape asPATCH /session/locale(GRI-2142).400 wrong_current_passwordfor a wrong current password.400 password_mismatchfor a mismatched confirmation.400 weak_passwordunder 8 characters — the same policyPOST /setup,POST /usersand the admin'sPATCH /users/{id}already enforce.401with no session cookie.the change — unlike the admin reset (GRI-2105/#226), which ends every
session of the target, because here the actor and the target are the
same account and ending its own current session would log the user out of
the very request that just succeeded.
The session-survival behaviour is the one place this departs from the admin
reset's convention on purpose, and is the one point most worth a second look
before building against it.
Every test fails against
devright now (404, no such route) — see theGRI-2153 board comment for the full output.
Test plan
cargo test --package server --test session_password_integration—all 6 fail against unimplemented
devcargo fmt --check -p servercargo clippy -p server --testsSuperseded: these tests landed in dev with #298, which carries this branch in its history. Closing.
Pull request closed