diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-06-28 17:51:55 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-06-28 17:51:55 +0000 |
| commit | bc22a271027ef61bcdb43faeacee2be400d874f8 (patch) | |
| tree | 97d0f3ba95a8ad82bd0e6269fe6c14c27cce5b99 /nova/tests | |
| parent | 7f4ec4054e77d424c8142847e86eff0cd6d14c37 (diff) | |
| parent | 169e601c8c387555609d67be11784fdd514d957f (diff) | |
Merge "Refactor Dom0 Glance plugin."
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/test_xenapi.py | 4 | ||||
| -rw-r--r-- | nova/tests/xenapi/stubs.py | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index 668172a92..c4b3262f5 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -561,7 +561,7 @@ class XenAPIVMTestCase(test.TestCase): """ vdi_recs_start = self._list_vdis() - stubs.stubout_fetch_image_glance_disk(self.stubs, raise_failure=True) + stubs.stubout_fetch_disk_image(self.stubs, raise_failure=True) self.assertRaises(xenapi_fake.Failure, self._test_spawn, 1, 2, 3) # No additional VDI should be found. @@ -627,7 +627,7 @@ class XenAPIVMTestCase(test.TestCase): self.check_vm_params_for_windows() def test_spawn_glance(self): - stubs.stubout_fetch_image_glance_disk(self.stubs) + stubs.stubout_fetch_disk_image(self.stubs) self._test_spawn(IMAGE_MACHINE, IMAGE_KERNEL, IMAGE_RAMDISK) diff --git a/nova/tests/xenapi/stubs.py b/nova/tests/xenapi/stubs.py index 2b3722f62..f6689c794 100644 --- a/nova/tests/xenapi/stubs.py +++ b/nova/tests/xenapi/stubs.py @@ -118,10 +118,10 @@ def stubout_lookup_image(stubs): stubs.Set(vm_utils, 'lookup_image', f) -def stubout_fetch_image_glance_disk(stubs, raise_failure=False): +def stubout_fetch_disk_image(stubs, raise_failure=False): """Simulates a failure in fetch image_glance_disk.""" - def _fake_fetch_image_glance_disk(context, session, instance, image, + def _fake_fetch_disk_image(context, session, instance, image, image_type): if raise_failure: raise fake.Failure("Test Exception raised by " @@ -136,8 +136,7 @@ def stubout_fetch_image_glance_disk(stubs, raise_failure=False): vdi_type = vm_utils.ImageType.to_string(image_type) return {vdi_type: dict(uuid=None, file=filename)} - stubs.Set(vm_utils, '_fetch_image_glance_disk', - _fake_fetch_image_glance_disk) + stubs.Set(vm_utils, '_fetch_disk_image', _fake_fetch_disk_image) def stubout_create_vm(stubs): |
