Review main Merged

95899[BUGFIX] Prevent E2E backend user state leakage

Wouter Wolters CR +2 V +2 Hard +209 −158 updated 10/03/26, 18:13

Commit message

The MFA OTP end-to-end test leaves a backend user in the shared test
database. Later backend-user tests fail because they rely on global
record counts and row positions.

Give the MFA user a unique name and remove it during cleanup. Address
backend-user fixture records by identity instead of global state.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Benjamin Franzke +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Benjamin Franzke +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1113

  1. Wouter Wolters uploaded patch set 1 09/17/26, 16:42

  2. core-ci voted on patch set 1 V +1 09/17/26, 16:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108759

  3. Georg Ringer commented on patch set 1 09/19/26, 09:12

    This change is ready for review.
  4. Simon Schaufelberger voted on patch set 1 CR +1 V +1 09/19/26, 18:29

  5. Josua Vogel voted on patch set 1 CR +1 V +1 09/29/26, 06:40

  6. Benni Mack commented on patch set 1 09/30/26, 08:07

    @ben@bnf.dev is that cool for you?
  7. Benjamin Franzke commented on patch set 1 10/02/26, 06:38

    Thanks for this finding! I understand that this test fixes the issue when the tests are executed sequentially, but since playwright may also run in parallel, it seems we actually need to use a lock here (and in the other use-module-tests) in order to ensure that only one of these tests operate on this database state at a time: https://playwright.dev/docs/test-parallel#test-locks Can you try to integrate that or should I have a look?

    mfa-otp.spec.ts:7

    I think we should use upstream provided `testInfo.testId` instead of rolling own randomness. See: * https://playwright.dev/docs/test-parallel#give-each-test-its-own-backend-data * https://playwright.dev/docs/api/class-testinfo#test-info-test-id

    mfa-otp.spec.ts:22

    I think this should be `afterAll()`, in case we ever add more users. or better: since this one test sets up the backend user (step "Create OTP user"), there could be a final step "Delete OTP user".
  8. Wouter Wolters uploaded patch set 2 CR +1 V +1 10/02/26, 18:59

  9. Wouter Wolters commented on patch set 1 10/02/26, 18:59

    Reply

    This feature is released in a version we currently not use in CI (playwright:v1.56.1-noble) see https://playwright.dev/docs/release-notes#version-163

    mfa-otp.spec.ts:7 Reply

    Done

    mfa-otp.spec.ts:22 Reply

    Done
  10. core-ci voted on patch set 2 V +1 10/02/26, 19:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109989

  11. Benjamin Franzke commented on patch set 2 CR +1 V +1 10/03/26, 17:56

    Reply

    Acknowledged

    Reply

    alright, thx, then we can/should do that later.
  12. Georg Ringer voted on patch set 2 CR +2 V +2 10/03/26, 18:13

  13. Georg Ringer merged patch set 3 10/03/26, 18:13