summaryrefslogtreecommitdiffstats
path: root/nova/tests/conductor/test_conductor.py
diff options
context:
space:
mode:
authorDan Smith <danms@us.ibm.com>2013-01-14 12:33:30 -0500
committerDan Smith <danms@us.ibm.com>2013-01-15 13:54:05 -0500
commit7855afe5f32ff865de9bf56ea1c62e77541216df (patch)
tree7b702658b3338959ad78102d6437d50a3ec5edda /nova/tests/conductor/test_conductor.py
parent41e0b409d0aa7f7fd9db6f99bfa7e409206986f5 (diff)
downloadnova-7855afe5f32ff865de9bf56ea1c62e77541216df.tar.gz
nova-7855afe5f32ff865de9bf56ea1c62e77541216df.tar.xz
nova-7855afe5f32ff865de9bf56ea1c62e77541216df.zip
Move migration_get_..._by_host_and_node to conductor
This moves the remaining migration-related database call out of the resource tracker to conductor: migration_get_in_progress_by_host_and_node() Related to blueprint no-db-compute Change-Id: I9bdf9fbbc3131964bf6078d19bf1cd9053a7e224
Diffstat (limited to 'nova/tests/conductor/test_conductor.py')
-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 cc3dbfcc0..5fc4caaea 100644
--- a/nova/tests/conductor/test_conductor.py
+++ b/nova/tests/conductor/test_conductor.py
@@ -130,6 +130,16 @@ class _BaseTestCase(object):
'fake-window',
'fake-host')
+ def test_migration_get_in_progress_by_host_and_node(self):
+ self.mox.StubOutWithMock(db,
+ 'migration_get_in_progress_by_host_and_node')
+ db.migration_get_in_progress_by_host_and_node(
+ self.context, 'fake-host', 'fake-node').AndReturn('fake-result')
+ self.mox.ReplayAll()
+ result = self.conductor.migration_get_in_progress_by_host_and_node(
+ self.context, 'fake-host', 'fake-node')
+ self.assertEqual(result, 'fake-result')
+
def test_migration_create(self):
inst = {'uuid': 'fake-uuid',
'host': 'fake-host',