summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-11-27 19:10:45 +0000
committerGerrit Code Review <review@openstack.org>2012-11-27 19:10:45 +0000
commit1658fa675132f1ffac9ffdb9ec002cc1fce37bd7 (patch)
treef25387982e9e9e99fdac8dc8b89a18fbc7b65a9e /nova/tests
parent47ddb8ca76fba11a6e77b12e9eeb61b5a9c78c48 (diff)
parent4e43747037058522087e6eb71ef3bcce266d55cc (diff)
Merge "Provide better error message for aggregate-create"
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_aggregates.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/nova/tests/api/openstack/compute/contrib/test_aggregates.py b/nova/tests/api/openstack/compute/contrib/test_aggregates.py
index a209fdce8..41a87ac6a 100644
--- a/nova/tests/api/openstack/compute/contrib/test_aggregates.py
+++ b/nova/tests/api/openstack/compute/contrib/test_aggregates.py
@@ -89,11 +89,15 @@ class AggregateTestCase(test.TestCase):
def test_create_with_incorrect_availability_zone(self):
def stub_create_aggregate(context, name, availability_zone):
- raise exception.InvalidAggregateAction
+ raise exception.InvalidAggregateAction(action='create_aggregate',
+ aggregate_id="'N/A'",
+ reason='invalid zone')
+
self.stubs.Set(self.controller.api, "create_aggregate",
stub_create_aggregate)
- self.assertRaises(exc.HTTPConflict, self.controller.create,
+ self.assertRaises(exception.InvalidAggregateAction,
+ self.controller.create,
self.req, {"aggregate":
{"name": "test",
"availability_zone": "nova_bad"}})