From fa4196bc53246b104ebfbbeb1f661466908e5ec8 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 2 Jan 2013 14:52:02 +0100 Subject: [PATCH] Fix Sqlite upgrade test when profiling to database is enabled The 'profiling' table is missing from expected tables when $wgProfileToDatabase is set to true, since patch-profiling.sql is applied while updating in this case. Change-Id: Iedbe72dca1deda728304fb95fe19ef3b4bdad8de --- tests/phpunit/includes/db/DatabaseSqliteTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/includes/db/DatabaseSqliteTest.php b/tests/phpunit/includes/db/DatabaseSqliteTest.php index 7958a8aa83..a391fc57ec 100644 --- a/tests/phpunit/includes/db/DatabaseSqliteTest.php +++ b/tests/phpunit/includes/db/DatabaseSqliteTest.php @@ -232,7 +232,7 @@ class DatabaseSqliteTest extends MediaWikiTestCase { * @todo: currently only checks list of tables */ public function testUpgrades() { - global $IP, $wgVersion; + global $IP, $wgVersion, $wgProfileToDatabase; // Versions tested $versions = array( @@ -251,6 +251,9 @@ class DatabaseSqliteTest extends MediaWikiTestCase { $currentDB = new DatabaseSqliteStandalone( ':memory:' ); $currentDB->sourceFile( "$IP/maintenance/tables.sql" ); + if ( $wgProfileToDatabase ) { + $currentDB->sourceFile( "$IP/maintenance/sqlite/archives/patch-profiling.sql" ); + } $currentTables = $this->getTables( $currentDB ); sort( $currentTables ); -- 2.20.1