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:
parent
08b93eebd6
commit
eaed42d8e4
@ -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 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user