TransactionTestCase causes tests to run with AUTOCOMMIT.

Bug #1379027 reported by Gavin Panella
6
This bug affects 1 person
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=provisioningserver --exclude=maastesting
    --exclude=maascli --logging-level=INFO --verbosity=1
  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

Revision history for this message
Andres Rodriguez (andreserl) wrote :

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.

Changed in maas:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.