summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2012-11-28 17:47:45 -0500
committerRussell Bryant <rbryant@redhat.com>2012-11-29 08:59:57 -0500
commitc383dcd43ecc85e05f437c2f81cded7ba54292a4 (patch)
tree1cc648bf18aa2b71baf81a3b5ff0ffe59e088f55
parent4b24907b679f26d976435e2dfb307db8fcfadc29 (diff)
Fix args to AggregateError exception.
This patch adds some arguments to the AggregateError exception when raised from a test. This didn't actually break the test, but it threw me off for a little bit. I had done something to break this test, so when I went to look at why, there was an exception logged because of this mistake, which wasn't related to what the real problem was. To avoid this unnecessarily making it into the test log, pass some stuff so that building the exception message succeeds. Change-Id: I4460f4844c16877ef78b363842518b0ba96eb9aa
-rw-r--r--nova/tests/test_xenapi.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py
index b139f2d11..9ed066a93 100644
--- a/nova/tests/test_xenapi.py
+++ b/nova/tests/test_xenapi.py
@@ -2334,7 +2334,8 @@ class XenAPIAggregateTestCase(stubs.XenAPITestBase):
def test_add_aggregate_host_raise_err(self):
"""Ensure the undo operation works correctly on add."""
def fake_driver_add_to_aggregate(context, aggregate, host, **_ignore):
- raise exception.AggregateError
+ raise exception.AggregateError(
+ aggregate_id='', action='', reason='')
self.stubs.Set(self.compute.driver, "add_to_aggregate",
fake_driver_add_to_aggregate)
metadata = {pool_states.POOL_FLAG: "XenAPI",