summaryrefslogtreecommitdiffstats
path: root/nova/test.py
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@yahoo.com>2010-10-12 20:16:23 -0700
committerVishvananda Ishaya <vishvananda@yahoo.com>2010-10-12 20:16:23 -0700
commit36cb0de8905917b0d6789e49eaecd722319458f8 (patch)
tree67f8479ee4b293b4ff825387707dd6ca4a6a82bb /nova/test.py
parent7ba0ab1e22b0453024b0b85be80d4e4544f95943 (diff)
parentd533d6414041437e642f2bbfbc7a86daa2527a65 (diff)
downloadnova-36cb0de8905917b0d6789e49eaecd722319458f8.tar.gz
nova-36cb0de8905917b0d6789e49eaecd722319458f8.tar.xz
nova-36cb0de8905917b0d6789e49eaecd722319458f8.zip
merged upstream
Diffstat (limited to 'nova/test.py')
-rw-r--r--nova/test.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/test.py b/nova/test.py
index 5cf2abd53..f6485377d 100644
--- a/nova/test.py
+++ b/nova/test.py
@@ -24,6 +24,7 @@ and some black magic for inline callbacks.
import sys
import time
+import datetime
import mox
import stubout
@@ -62,6 +63,7 @@ class TrialTestCase(unittest.TestCase):
# NOTE(vish): We need a better method for creating fixtures for tests
# now that we have some required db setup for the system
# to work properly.
+ self.start = datetime.datetime.utcnow()
if db.network_count(None) != 5:
network_manager.VlanManager().create_networks(None,
FLAGS.fixed_range,
@@ -84,6 +86,8 @@ class TrialTestCase(unittest.TestCase):
self.stubs.UnsetAll()
self.stubs.SmartUnsetAll()
self.mox.VerifyAll()
+ # NOTE(vish): Clean up any ips associated during the test.
+ db.fixed_ip_disassociate_all_by_timeout(None, FLAGS.host, self.start)
db.network_disassociate_all(None)
rpc.Consumer.attach_to_twisted = self.originalAttach
for x in self.injected: