tests: skip math table creation for SQLite DB

SQLite has global indices, not per table one.  When using the database
updater to create the `unitest_math` table, we would get an error
with a duplicate `math_inputhash` index which is created by the the
database installer.

This patch skips the testBasicCreateTable() test on sqlite.

Change-Id: I6da56d67d7af45f86cf6163cf73f5464505b43f3
This commit is contained in:
Antoine Musso 2013-04-26 14:11:41 +02:00
parent 08b93eebd6
commit eaed42d8e4
1 changed files with 7 additions and 3 deletions

View File

@ -83,6 +83,12 @@ class MathDatabaseTest extends MediaWikiTestCase {
* @covers MathHooks::onLoadExtensionSchemaUpdates
*/
public function testBasicCreateTable() {
if( $this->db->getType() === 'sqlite' ) {
$this->markTestSkipped( "SQLite has global indices. We cannot " .
"create the `unitest_math` table, its math_inputhash index " .
"would conflict with the one from the real `math` table."
);
}
global $wgDebugMath;
$this->db->dropTable( "math", __METHOD__ );
$wgDebugMath = false;
@ -96,6 +102,4 @@ class MathDatabaseTest extends MediaWikiTestCase {
$this->assertEquals( sizeof( $row ), 2 * self::NUM_BASIC_FIELDS );
}
}
}