TransactionTestCase causes tests to run with AUTOCOMMIT.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Won't Fix
|
High
|
Unassigned |
Bug Description
Using TransactionTestCase means that you get Django's default
transaction management, which is defined in the DATABASES stanza in
Django's settings. The default is `AUTOCOMMIT: True`, but this is not
how we expect MAAS to run, ever. However, setting `AUTOCOMMIT: False`
means I can't even start the test suite:
$ bin/test.maas
nosetests --exclude=
--exclude=
Creating test database for alias 'default'...
Got an error creating the test database: CREATE DATABASE cannot run
inside a transaction block
Destroying old test database 'default'...
Got an error recreating the test database: current transaction is
aborted, commands ignored until end of transaction block
Dear user,
This is an automated message.
We believe this bug report is no longer an issue in the latest version of MAAS. For such reason, we are making this issue as Won't Fix. If you believe this issue is still present in the latest version of MAAS, please re-open this bug report.