Repository navigation
Open
Description
Related: #893
complement/tests/csapi/account_change_password_test.go
Lines 110 to 122 in 1a2baac
| func changePassword(t *testing.T, passwordClient *client.CSAPI, oldPassword string, newPassword string) { | |
| t.Helper() | |
| reqBody := client.WithJSONBody(t, map[string]interface{}{ | |
| "auth": map[string]interface{}{ | |
| "type": "m.login.password", | |
| "identifier": map[string]interface{}{ | |
| "type": "m.id.user", | |
| "user": passwordClient.UserID, | |
| }, | |
| "password": oldPassword, | |
| }, | |
| "new_password": newPassword, | |
| }) |
The password change helper requires being capable of skipping UIA, which is not spec compliant and causes flaky failures in all tests that use it.
The test also depends on being able to do oneshot UIA as it does not use the helper:
complement/tests/csapi/account_change_password_test.go
Lines 82 to 95 in 1a2baac
| t.Run("After changing password, different sessions can optionally be kept", func(t *testing.T) { | |
| _, sessionOptional := createSession(t, deployment, passwordClient.UserID, password2) | |
| reqBody := client.WithJSONBody(t, map[string]interface{}{ | |
| "auth": map[string]interface{}{ | |
| "type": "m.login.password", | |
| "identifier": map[string]interface{}{ | |
| "type": "m.id.user", | |
| "user": passwordClient.UserID, | |
| }, | |
| "password": password2, | |
| }, | |
| "new_password": "new_optional_password", | |
| "logout_devices": false, | |
| }) |
Metadata
Metadata
Assignees
Labels
No labels
Activity