Rerunning unit tests fails with DB error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Dmitrii Metelkin |
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_
[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"
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.
Changed in mahara: | |
status: | New → Confirmed |
assignee: | nobody → Dmitrii Metelkin (dmitriim) |
Changed in mahara: | |
milestone: | none → 18.04.0 |
importance: | Undecided → Medium |
Changed in mahara: | |
status: | Confirmed → In Progress |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Patch for "master" branch: https:/ /reviews. mahara. org/8163