Make sqlite in-memory-db usable to unittest
Move migrate monkey patch from nova.tests.test_migrations to nova.db.sqlalchemy.migration Change-Id: I018e44903558cad6311fd368787583322f962d0c
This commit is contained in:
@@ -40,6 +40,7 @@ from nova.openstack.common import cfg
|
||||
from nova import utils
|
||||
from nova import service
|
||||
from nova.testing.fake import rabbit
|
||||
from nova.tests import reset_db
|
||||
from nova.virt import fake
|
||||
|
||||
|
||||
@@ -129,8 +130,7 @@ class TestCase(unittest.TestCase):
|
||||
# now that we have some required db setup for the system
|
||||
# to work properly.
|
||||
self.start = utils.utcnow()
|
||||
shutil.copyfile(os.path.join(FLAGS.state_path, FLAGS.sqlite_clean_db),
|
||||
os.path.join(FLAGS.state_path, FLAGS.sqlite_db))
|
||||
reset_db()
|
||||
|
||||
# emulate some of the mox stuff, we can't use the metaclass
|
||||
# because it screws with our generators
|
||||
|
||||
Reference in New Issue
Block a user