diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2011-06-27 23:27:58 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-06-27 23:27:58 +0000 |
| commit | 2cc5d8916b8827faba416a0e317b106afa453ae7 (patch) | |
| tree | b5f9d5ac6b4d59e7d47cbe271ba64e0486919559 /nova | |
| parent | 89b4f93600d3fe137b9ebe565630f532da367dd9 (diff) | |
| parent | 9978d656d262a95e17a60a2c137664b315f8191a (diff) | |
This speeds up multiple runs of tests to start up much faster because it only runs db migrations if the test db doesn't exist. It also adds the -r/--recreate-db option to run_tests.sh to delete the tests db so it will be recreated.
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/tests/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/tests/__init__.py b/nova/tests/__init__.py index 7fba02a93..5e0cb718e 100644 --- a/nova/tests/__init__.py +++ b/nova/tests/__init__.py @@ -50,7 +50,7 @@ def setup(): testdb = os.path.join(FLAGS.state_path, FLAGS.sqlite_db) if os.path.exists(testdb): - os.unlink(testdb) + return migration.db_sync() ctxt = context.get_admin_context() network_manager.VlanManager().create_networks(ctxt, |
