Issue Bug Resolved

#110735Prevent E2E backend user state leakage

Wouter Wolters 09/17/26, 16:38 updated 10/03/26, 18:20

Description

The MFA OTP E2E test creates a backend user named
mfa_test_user but does not remove it afterward.

Because E2E tests share the same test installation, the additional user
leaks into the backend users module tests. These tests assume a fixed
number and ordering of backend users, causing several failures during an
unsharded test run.

The MFA test should use a unique username and remove the created user in
guaranteed cleanup. Backend users module tests should locate their fixture
records by identity instead of relying on global record counts or row
positions.

Steps to reproduce:

1. Run the complete E2E suite without sharding.
2. Let the MFA OTP test create its backend user.
3. Observe failures in the backend users module tests caused by the
additional record.

Expected result:

- The MFA test leaves no backend user behind.
- Backend users tests operate on their defined fixture records.
- The MFA and backend users tests pass sequentially in the same instance.

Reviews 1

History 13

  1. Wouter Wolters commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-10-03T18:20:11+00:00" > 10/03/26, 18:20 </span>

    Applied in changeset commit:52f2de8d5cb023d9e9311b5789816e4a9a2e97e4.