Subject: Re: [PATCH 1/3] Script to install, delete and clear a MediaWiki

From: "Simon.Cathebras" <[email-masked]>
Date: Wed, 06 Jun 2012 15:49:20 +0200

On 05/06/2012 18:48, Junio C Hamano wrote:
> Simon Cathebras<[email-masked]>  writes:
>
>> From: Guillaume Sasdy<[email-masked]>
>>
>> install_wiki.sh expects the first argument to be 'install' or 'delete'
>> 'install' installs a MediaWiki on the web's server with SQLite3
>> 'delete' deletes the previously created wiki.
>> Note those functionnalities are made to be used from the user command line in
>> the directory t/
>>
>> install_wiki also defines a function wiki_reset which clear all content
>> of the previously created wiki. Note this functionnality is made to be
>> used only by our test function in a subdirectory of t/
>>
>> Signed-off-by: Simon Cathebras<[email-masked]>
>> Signed-off-by: Guillaume Sasdy<[email-masked]>
>> Signed-off-by: Julien Khayat<[email-masked]>
>> Signed-off-by: Simon Perrat<[email-masked]>
>> Signed-off-by: Charles Roussel<[email-masked]>
>> Signed-off-by: Matthieu Moy<[email-masked]>
>> ---
>>   t/install-wiki.sh                |  38 ++++++++++
>>   t/install-wiki/LocalSettings.php | 129 ++++++++++++++++++++++++++++++++
>>   t/install-wiki/db_install.php    | 110 ++++++++++++++++++++++++++++
>>   t/test-gitmw-lib.sh              | 154 +++++++++++++++++++++++++++++++++++++++
> Hrm, I see my name on the Cc: list, but is this meant to go into my tree?

Yes, but we would like to apologize for the poor choice of word. It would
be more correct to say that we are proposing to you an improvement for
git-remote-mediawiki, currently in git/contrib/mw-to-git/t.
This improvement is actually a test environment for git-remote-mediawiki.

> The t/ directory is a very strange place to put an installation
> procedure for anything.

Sorry again, we intended to move our test environment from t/ to *PATH*.
Unfortunately, we made a wrong manipulation and we couldn't solve this
issue. But it will be fixed in the next patch.

>    Is this because later test scripts that
> test mw-to-git gateway need to have a mediawiki instance that runs
> locally?

Exactly.

>
> I am wondering why it is not sufficient to structure the MediaWiki
> related tests more like existing tests that require a running HTTP
> server, namely, t/lib-httpd.sh that allows such tests to proceed
> only if a suitable server is available, but we do not ship a script
> to install Apache for that.

Actually, we are providing an install script for a MediaWiki, because we
need some specific configurations on it to run all the tests correctly. Without forget to mention that our test are creating several page on the wiki used for the tests, and reset it several times... It wouldn't be realy smart to use a real and realy used wiki to test git-mw. As a
matter of fact, it is easier to create a script than providing a complex
documentation on "how to install our specific mediawiki" for the user.
In addition, we are providing function of reset and deletion on the
mediawiki, for purpose of tests. And it is impossible to do if we do not
install it ourselves.
Anyway, it is possible to skip those tests if a wiki is not intalled.
For all those reason, we believe that we must keep this script to install a wiki in our code.

>>   mode change 100644 =>  100755 t/test-lib-functions.sh
>>   mode change 100644 =>  100755 t/test-lib.sh
> Why?

A wrong manipulation during the development: chmod +x on those file... We
have forgotten to correct it. Correction in the next patch.

-- 
CATHEBRAS Simon

2A-ENSIMAG

Filière Ingéniérie des Systèmes d'Information
Membre Bug-Buster