summaryrefslogtreecommitdiffstats
path: root/nova/tests/conductor
diff options
context:
space:
mode:
authorDan Smith <danms@us.ibm.com>2013-03-29 09:19:57 -0700
committerDan Smith <danms@us.ibm.com>2013-03-29 09:23:45 -0700
commitec75cc2a6bc6e3f367b3377515cb9c4b99a6ab29 (patch)
tree5dfa0516df24e257ba1a52960c544e174119397d /nova/tests/conductor
parentd4e1926d53b28a23427f7f541cf0fad443c90a53 (diff)
downloadnova-ec75cc2a6bc6e3f367b3377515cb9c4b99a6ab29.tar.gz
nova-ec75cc2a6bc6e3f367b3377515cb9c4b99a6ab29.tar.xz
nova-ec75cc2a6bc6e3f367b3377515cb9c4b99a6ab29.zip
Fix automatic confirmation of resizes for no-db-compute
compute/api.py:confirm_resize() was still making a bunch of calls against the database that were tripping over the no-db-compute enforcement checks. Instead of trying to unwind all of the instance action, quota, etc code and divert to conductor, just farm out the entire confirm_resize() call to conductor. Fixes bug 1161402 Change-Id: I121040a3b575f5866d45cc8ef6862d67f5558715
Diffstat (limited to 'nova/tests/conductor')
-rw-r--r--nova/tests/conductor/test_conductor.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/nova/tests/conductor/test_conductor.py b/nova/tests/conductor/test_conductor.py
index df0f5e73b..1c675ec61 100644
--- a/nova/tests/conductor/test_conductor.py
+++ b/nova/tests/conductor/test_conductor.py
@@ -599,6 +599,16 @@ class _BaseTestCase(object):
self.mox.ReplayAll()
self.conductor.compute_stop(self.context, 'instance')
+ def test_compute_confirm_resize(self):
+ self.mox.StubOutWithMock(self.conductor_manager.compute_api,
+ 'confirm_resize')
+ self.conductor_manager.compute_api.confirm_resize(self.context,
+ 'instance',
+ 'migration')
+ self.mox.ReplayAll()
+ self.conductor.compute_confirm_resize(self.context, 'instance',
+ 'migration')
+
class ConductorTestCase(_BaseTestCase, test.TestCase):
"""Conductor Manager Tests."""