mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #44731
[Bug 1723286] A change has been merged
Reviewed: https://reviews.mahara.org/8163
Committed: https://git.mahara.org/mahara/mahara/commit/598db823a5abe206083b2086a4e086caaee0b392
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch: master
commit 598db823a5abe206083b2086a4e086caaee0b392
Author: Dmitrii Metelkin <dmitriim@xxxxxxxxxxxxxxx>
Date: Thu Oct 19 16:57:17 2017 +1100
Bug 1723286: use TestingUtil::drop_database with PHPUnit tests
behatnotneeded
Change-Id: Ic42778ecf4c3c5bc90cbc81244a9744d405983fa
--
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/1723286
Title:
Rerunning unit tests fails with DB error
Status in Mahara:
Fix Committed
Bug description:
On master.
When you rerun unit tests they fail with:
[DBG] 9d (lib/dml.php:157) postgres8 error: [-1: ERROR: cannot drop constraint tst_fram_id_pk on table tst_framework because other objects depend on it
[DBG] 9d (lib/dml.php:157) DETAIL: constraint tst_coll_fra_fk on table tst_collection depends on index tst_fram_id_pk
[DBG] 9d (lib/dml.php:157) HINT: Use DROP ... CASCADE to drop the dependent objects too.] in EXECUTE("ALTER TABLE tst_framework DROP CONSTRAINT tst_fram_id_pk")Command was: ALTER TABLE tst_framework DROP CONSTRAINT tst_fram_id_pk
[DBG] 9d (lib/dml.php:157) postgres8 error: [-1: ERROR: cannot drop table tst_framework because other objects depend on it
[DBG] 9d (lib/dml.php:157) DETAIL: constraint tst_coll_fra_fk on table tst_collection depends on table tst_framework
[DBG] 9d (lib/dml.php:157) HINT: Use DROP ... CASCADE to drop the dependent objects too.] in EXECUTE("DROP TABLE tst_framework")Command was: DROP TABLE tst_framework
This happens because we don't clean up coll_fra_fk index on {collection} table when uninstalling.
The proper fix would be to use the same set of functions for behat and unit tests when we drop a site.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1723286/+subscriptions
References