diff options
Diffstat (limited to 'nova/test.py')
-rw-r--r-- | nova/test.py | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/nova/test.py b/nova/test.py index bff43b6c7..42accffa7 100644 --- a/nova/test.py +++ b/nova/test.py @@ -26,15 +26,14 @@ import datetime import unittest import mox +import shutil import stubout from nova import context from nova import db from nova import fakerabbit from nova import flags -from nova import log as logging from nova import rpc -from nova.network import manager as network_manager FLAGS = flags.FLAGS @@ -64,15 +63,7 @@ class TestCase(unittest.TestCase): # now that we have some required db setup for the system # to work properly. self.start = datetime.datetime.utcnow() - ctxt = context.get_admin_context() - if db.network_count(ctxt) != 5: - network_manager.VlanManager().create_networks(ctxt, - FLAGS.fixed_range, - 5, 16, - FLAGS.fixed_range_v6, - FLAGS.vlan_start, - FLAGS.vpn_start, - ) + shutil.copyfile("clean.sqlite", "tests.sqlite") # emulate some of the mox stuff, we can't use the metaclass # because it screws with our generators @@ -93,9 +84,6 @@ class TestCase(unittest.TestCase): self.mox.VerifyAll() # NOTE(vish): Clean up any ips associated during the test. ctxt = context.get_admin_context() - db.fixed_ip_disassociate_all_by_timeout(ctxt, FLAGS.host, - self.start) - db.network_disassociate_all(ctxt) rpc.Consumer.attach_to_eventlet = self.originalAttach for x in self.injected: try: @@ -106,7 +94,6 @@ class TestCase(unittest.TestCase): if FLAGS.fake_rabbit: fakerabbit.reset_all() - db.security_group_destroy_all(ctxt) super(TestCase, self).tearDown() finally: self.reset_flags() |