Gergő Tisza has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/291314

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
(cherry picked from commit 526b99785557aa705a82d4dbd94ddea544e75a00)
---
M tests/phpunit/CentralAuthTestCaseUsingDatabase.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/14/291314/1

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/291314
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5e08c0a25a03405ac6f3eddd71f6d1c37f21db0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: REL1_27
Gerrit-Owner: GergÅ‘ Tisza <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>

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

Reply via email to