mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #33882
[Bug 1515473] A change has been merged
Reviewed: https://reviews.mahara.org/6228
Committed: https://git.mahara.org/mahara/mahara/commit/48ea9ab8ae39d04bcebba8d22497ac5b57e85585
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch: 15.10_STABLE
commit 48ea9ab8ae39d04bcebba8d22497ac5b57e85585
Author: Aaron Wells <aaronw@xxxxxxxxxxxxxxx>
Date: Fri Nov 13 12:22:36 2015 +1300
Call parent::setUp() in WebServiceTestBase (Bug 1515473)
behatnotneeded: This is phpunit, not behat. ;)
Change-Id: I906089c82c6e5ca521007359006b49381c537f2b
(cherry picked from commit b89579095531e938a8175cbe7548bf0acd966e8e)
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1515473
Title:
15.04 Unit tests fail using MySql
Status in Mahara:
Fix Committed
Status in Mahara 15.04 series:
Fix Committed
Status in Mahara 15.10 series:
Fix Committed
Status in Mahara 16.04 series:
Fix Committed
Bug description:
To replicate:
1. Install Mahara on MySQL
2. In the terminal, cd to your docroot (e.g. /var/www/mahara)
3. run "make phpunit"
Expected outcome: Something like "........SSS Time: 9.42 seconds, Memory: 29.75Mb"
Actual outcome: Big ugly error stack, and "........EEE"
Mahara:
$config->version = 2015030419;
$config->series = '15.04';
$config->release = '15.04.4';
DB: mysql 5.5
(mysql Ver 14.14 Distrib 5.5.46, for debian-linux-gnu (x86_64) using readline 6.3)
When running unit tests on a vanilla Mahara 15.04.4 with a mysql
database, 3 tests fail:
Configuration read from /var/www/palnet/mahara/phpunit.xml
........EEE
Time: 39.5 seconds, Memory: 36.00Mb
There were 3 errors:
1) WebServiceGroupTest::testRun
SQLException: Failed to get a recordset: mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"tst_config" WHERE "field" = 'webservice_enabled' LIMIT 2' at line 1] in EXECUTE("SELECT * FROM "tst_config" WHERE "field" = 'webservice_enabled' LIMIT 2")
Command was: SELECT * FROM "tst_config" WHERE "field" = ? and values was (webservice_enabled)
/var/www/palnet/mahara/htdocs/lib/dml.php:480
/var/www/palnet/mahara/htdocs/lib/dml.php:314
/var/www/palnet/mahara/htdocs/lib/dml.php:291
/var/www/palnet/mahara/htdocs/lib/mahara.php:885
/var/www/palnet/mahara/htdocs/webservice/tests/phpunit/WebServiceTestBase.class.php:85
/var/www/palnet/mahara/htdocs/webservice/tests/phpunit/WebServiceGroupTest.php:28
2) WebServiceInstitutionTest::testRun
SQLException: Failed to get a recordset: mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"tst_config" WHERE "field" = 'webservice_enabled' LIMIT 2' at line 1] in EXECUTE("SELECT * FROM "tst_config" WHERE "field" = 'webservice_enabled' LIMIT 2")
Command was: SELECT * FROM "tst_config" WHERE "field" = ? and values was (webservice_enabled)
/var/www/palnet/mahara/htdocs/lib/dml.php:480
/var/www/palnet/mahara/htdocs/lib/dml.php:314
/var/www/palnet/mahara/htdocs/lib/dml.php:291
/var/www/palnet/mahara/htdocs/lib/mahara.php:885
/var/www/palnet/mahara/htdocs/webservice/tests/phpunit/WebServiceTestBase.class.php:85
/var/www/palnet/mahara/htdocs/webservice/tests/phpunit/WebServiceInstitutionTest.php:28
3) WebServiceUserTest::testRun
SQLException: Failed to get a recordset: mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"tst_config" WHERE "field" = 'webservice_enabled' LIMIT 2' at line 1] in EXECUTE("SELECT * FROM "tst_config" WHERE "field" = 'webservice_enabled' LIMIT 2")
Command was: SELECT * FROM "tst_config" WHERE "field" = ? and values was (webservice_enabled)
/var/www/palnet/mahara/htdocs/lib/dml.php:480
/var/www/palnet/mahara/htdocs/lib/dml.php:314
/var/www/palnet/mahara/htdocs/lib/dml.php:291
/var/www/palnet/mahara/htdocs/lib/mahara.php:885
/var/www/palnet/mahara/htdocs/webservice/tests/phpunit/WebServiceTestBase.class.php:85
/var/www/palnet/mahara/htdocs/webservice/tests/phpunit/WebServiceUserTest.php:28
FAILURES!
Tests: 11, Assertions: 21, Errors: 3.
make: *** [phpunit] Error 2
-----------------------------------------------------------------------------------------------
On the same vanilla Mahara 15.04.4, the unit tests pass using postgres:
PHPUnit 4.3.4 by Sebastian Bergmann.
Configuration read from /var/www/palnet/mahara/phpunit.xml
........SSS
Time: 38.13 seconds, Memory: 35.25Mb
OK, but incomplete, skipped, or risky tests!
Tests: 11, Assertions: 21, Skipped: 3.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1515473/+subscriptions
References