summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@yahoo.com>2010-09-09 22:53:31 -0700
committerVishvananda Ishaya <vishvananda@yahoo.com>2010-09-09 22:53:31 -0700
commitece1c84203890e87834bb53acaf98420fdeee6dc (patch)
treec52bd68d193174ddd76a987069fbbe7088f23e10
parent5cb90074df70daa60241930da9940e093a3812ba (diff)
downloadnova-ece1c84203890e87834bb53acaf98420fdeee6dc.tar.gz
nova-ece1c84203890e87834bb53acaf98420fdeee6dc.tar.xz
nova-ece1c84203890e87834bb53acaf98420fdeee6dc.zip
address test almost works
-rw-r--r--nova/tests/quota_unittest.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/nova/tests/quota_unittest.py b/nova/tests/quota_unittest.py
index d7c07bfab..9d697ccd3 100644
--- a/nova/tests/quota_unittest.py
+++ b/nova/tests/quota_unittest.py
@@ -41,7 +41,7 @@ class QuotaTestCase(test.TrialTestCase):
quota_cores=4,
quota_volumes=2,
quota_gigabytes=20,
- quota_floating_ips=2)
+ quota_floating_ips=1)
self.cloud = cloud.CloudController()
self.manager = manager.AuthManager()
@@ -145,8 +145,18 @@ class QuotaTestCase(test.TrialTestCase):
except exception.NotFound:
db.floating_ip_create(None, {'address': address,
'host': FLAGS.host})
- #float_addr = self.network.allocate_floating_ip(self.context,
- # self.project.id)
+ float_addr = self.network.allocate_floating_ip(self.context,
+ self.project.id)
+ # NOTE(vish): This assert doesn't work. When cloud attempts to
+ # make an rpc.call, the test just finishes with OK. It
+ # appears to be something in the magic inline callbacks
+ # that is breaking.
self.assertFailure(self.cloud.allocate_address(self.context),
cloud.QuotaError)
+ try:
+ yield self.cloud.allocate_address(self.context)
+ self.fail('Should have raised QuotaError')
+ except cloud.QuotaError:
+ pass
+