Page MenuHomePhabricator

Need a mechanism for injecting a LocalSettings.php fragment before nodejs browser tests
Closed, DuplicatePublic

Description

Our use case is T190829, for which we want to add this configuration to LocalSettings.php:

$wgEnableUploads = true;

Ideally, we can install this custom config and launch a corresponding PHP server for just this one extension's browser tests. I can imagine that we use a LocalSettings.d similar to how mediawiki-vagrant is configured, or maybe we can just supply the configuration on the command-line to reduce potential race conditions if servers are launched for other extensions.

This just became possible with T199116.

Precedents

The Ruby browser test running script would cat directly onto LocalSettings.php,
https://phabricator.wikimedia.org/source/integration-config/browse/master/dockerfiles/quibble-stretch-bundle/mwselenium.sh$35-39

Unfortunately, this can't be cleaned up easily and will break isolation between tests.

Event Timeline

awight created this task.May 16 2019, 10:06 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 16 2019, 10:06 AM

Looks like the biggest blocker is T199116: Quibble should run `npm install` and `npm run selenium-test` for each extension/skin that has Selenium tests, because:

mwselenium.sh wouldn't quite work in our case, since the test is being run from mw-core

It would be nice to package the PHP fragments in a conf.d-style directory, which gets cleaned and repopulated between browser tests on each repo, to reduce the chance of interference between tests.

awight updated the task description. (Show Details)Wed, Sep 11, 8:00 AM