jenkins-bot has submitted this change and it was merged.

Change subject: Don't blindly create database tables in tests
......................................................................


Don't blindly create database tables in tests

Something changed that makes the code path here no longer need to create
the tables. So check whether it's needed like we do in the other code
path.

Change-Id: Ie5e08c0a25a03405ac6f3eddd71f6d1c37f21db0
---
M tests/phpunit/CentralAuthTestCaseUsingDatabase.php
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/phpunit/CentralAuthTestCaseUsingDatabase.php 
b/tests/phpunit/CentralAuthTestCaseUsingDatabase.php
index a27b355..d4e6bf1 100644
--- a/tests/phpunit/CentralAuthTestCaseUsingDatabase.php
+++ b/tests/phpunit/CentralAuthTestCaseUsingDatabase.php
@@ -48,7 +48,9 @@
                        }
                        $db->tablePrefix( $originalPrefix );
                } else {
-                       $db->sourceFile( __DIR__ . '/../../central-auth.sql' );
+                       if ( !$db->tableExists( 'globaluser' ) ) {
+                               $db->sourceFile( __DIR__ . 
'/../../central-auth.sql' );
+                       }
                }
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/291235
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie5e08c0a25a03405ac6f3eddd71f6d1c37f21db0
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
Gerrit-Reviewer: GergÅ‘ Tisza <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to