summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-03-12 23:59:59 +0000
committerGerrit Code Review <review@openstack.org>2013-03-12 23:59:59 +0000
commitb0694b33d3a7c32b582030d44231ef31bcc8ec60 (patch)
treed0a5a1b1a273e8c60738e8c9e94e68808ec2dc8e /nova/tests
parent071719a3e16b747bc9c2cdadab829c3c1287eede (diff)
parent40feb35898ed0a6d57b1f481c165e683796b045c (diff)
Merge "xenapi: Fix reboot with hung volumes"
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/compute/test_compute.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py
index 9da253360..f8c0e86f2 100644
--- a/nova/tests/compute/test_compute.py
+++ b/nova/tests/compute/test_compute.py
@@ -1150,15 +1150,20 @@ class ComputeTestCase(BaseTestCase):
# this is called with the wrong args, so we have to hack
# around it.
reboot_call_info = {}
- expected_call_info = {'args': (econtext, updated_instance1,
- expected_nw_info, reboot_type,
- fake_block_dev_info),
- 'kwargs': {}}
+ expected_call_info = {
+ 'args': (econtext, updated_instance1, expected_nw_info,
+ reboot_type),
+ 'kwargs': {'block_device_info': fake_block_dev_info}}
def fake_reboot(*args, **kwargs):
reboot_call_info['args'] = args
reboot_call_info['kwargs'] = kwargs
+ # NOTE(sirp): Since `bad_volumes_callback` is a function defined
+ # within `reboot_instance`, we don't have access to its value and
+ # can't stub it out, thus we skip that comparison.
+ kwargs.pop('bad_volumes_callback')
+
self.stubs.Set(self.compute.driver, 'reboot', fake_reboot)
# Power state should be updated again