git/contrib/mw-to-git
Ævar Arnfjörð Bjarmason 1d42b4d01c remote-mediawiki tests: use CLI installer
Replace the use of screen-scraping in the test environment
installation with simply invoking MediaWiki's command-line
installer.

The old code being deleted here relied on our own hardcoded POST
parameter names & the precise layout of MediaWiki's GUI installer at a
given version. Somewhere between [1] and now this inevitably broke.

As far as I can tell there was never a reason for this screen-scraping
hack, when [1] was introduced it hardcoded MediaWiki 1.19.0, the CLI
installer was introduced in 1.17.0. Perhaps the authors weren't aware
of it, or this code was written for an older version.

This allows us to simply delete our own template version of
LocalSettings.php, it'll instead be provided by the CLI installer.

While we're at it let's fix a few things, these changes weren't
practical to split up (I'd need to fix code I was about to mostly
delete)

  * Use MediaWiki's own defaults where possible, e.g. before we'd name
    the database "wikidb.sqlite", now we'll simply use whatever name
    MediaWiki prefers (currently my_wiki.sqlite) by only supplying the
    directory name the SQLite file will be dropped into, not the full
    path.

  * Put all of our database & download assets into a new "mediawiki/"
    folder. This makes it easier to reason about as the current &
    template "backup" database the tests keep swapping around live
    next to each other.

    This'll also prevent future potential breakage as there isn't a
    single SQLite database. MediaWiki also creates a job queue
    database and a couple of cache databases. In practice it seems we
    got away with not resetting these when we reset the main database,
    but it's the sort of thing that could break in the future (reset,
    main store doesn't have the article, but the cache does).

  * The "delete" function now only deletes the MediaWiki installation
    & database, not the downloaded .tar.gz file. This makes us
    friendlier to a developer on a slow connection.

1. 5ef6ad1785 ("git-remote-mediawiki: scripts to install, delete and
   clear a MediaWiki", 2012-07-06)

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-09-21 12:37:38 -07:00
..
bin-wrapper git-remote-mediawiki: add a git bin-wrapper for developement 2013-07-08 08:55:53 -07:00
Git remote-mediawiki: limit filenames to legal 2017-11-01 13:42:38 +09:00
t remote-mediawiki tests: use CLI installer 2020-09-21 12:37:38 -07:00
.gitignore git-remote-mediawiki: ignore generated git-mw 2013-08-13 09:52:22 -07:00
.perlcriticrc Fix spelling errors in no-longer-updated-from-upstream modules 2019-11-10 16:00:55 +09:00
git-mw.perl remote-mediawiki doc: correct link to GitHub project 2020-09-16 16:11:53 -07:00
git-remote-mediawiki.perl remote-mediawiki doc: correct link to GitHub project 2020-09-16 16:11:53 -07:00
git-remote-mediawiki.txt remote-mediawiki doc: correct link to GitHub project 2020-09-16 16:11:53 -07:00
Makefile perl: fix installing modules from contrib 2018-04-11 10:29:03 +09:00