Page MenuHomePhabricator

PHPUnit integration tests overwrite real data when virtual domains are used
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue:

  • Install and configure an extension that uses virtual domains, e.g. CheckUser.
  • Run PHPUnit tests.

What happens?:
Watch in horror as preexisting data from the shared tables used by the extension is wiped out and test database prefixes as well as test data is leaked.

What should have happened instead?:
The tests should either use local tables or manage table prefixes and associated bookkeeping for each virtual domain.

Details

Event Timeline

Change #1112796 had a related patch set uploaded (by Máté Szabó; author: Máté Szabó):

[mediawiki/core@master] phpunit: Disable virtual domains in tests

https://gerrit.wikimedia.org/r/1112796

• mszabo changed the task status from Open to In Progress.Jan 20 2025, 4:16 PM
• mszabo triaged this task as Medium priority.
• mszabo moved this task from Inbox to PHPUnit on the MediaWiki-Core-Tests board.

Change #1112796 merged by jenkins-bot:

[mediawiki/core@master] phpunit: Disable virtual domains in tests

https://gerrit.wikimedia.org/r/1112796