summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/test_scheduler.py7
-rw-r--r--nova/tests/test_service.py24
2 files changed, 20 insertions, 11 deletions
diff --git a/nova/tests/test_scheduler.py b/nova/tests/test_scheduler.py
index 487e7b9e6..188e50aac 100644
--- a/nova/tests/test_scheduler.py
+++ b/nova/tests/test_scheduler.py
@@ -110,10 +110,11 @@ class ZoneSchedulerTestCase(test.TestCase):
self.mox.StubOutWithMock(rpc, 'cast', use_mock_anything=True)
rpc.cast(ctxt,
'compute.host1',
- {'method': 'create_instance', #TODO: check it
- 'args': {'availability_zone': 'zone1'}})
+ {'method': 'run_instance',
+ 'args':{'instance_id': 'i-ffffffff',
+ 'availability_zone': 'zone1'}})
self.mox.ReplayAll()
- scheduler.create_instance(ctxt, 'compute', availability_zone='zone1')
+ scheduler.run_instance(ctxt, 'compute', instance_id='i-ffffffff', availability_zone='zone1')
class SimpleDriverTestCase(test.TestCase):
diff --git a/nova/tests/test_service.py b/nova/tests/test_service.py
index b30838ad7..1400b88e5 100644
--- a/nova/tests/test_service.py
+++ b/nova/tests/test_service.py
@@ -107,11 +107,13 @@ class ServiceTestCase(test.TestCase):
service_create = {'host': host,
'binary': binary,
'topic': topic,
- 'report_count': 0}
+ 'report_count': 0,
+ 'availability_zone': 'nova'}
service_ref = {'host': host,
'binary': binary,
'report_count': 0,
- 'id': 1}
+ 'id': 1,
+ 'availability_zone': 'nova'}
service.db.service_get_by_args(mox.IgnoreArg(),
host,
@@ -135,12 +137,14 @@ class ServiceTestCase(test.TestCase):
service_create = {'host': host,
'binary': binary,
'topic': topic,
- 'report_count': 0}
+ 'report_count': 0,
+ 'availability_zone': 'nova'}
service_ref = {'host': host,
'binary': binary,
'topic': topic,
'report_count': 0,
- 'id': 1}
+ 'id': 1,
+ 'availability_zone': 'nova'}
service.db.service_get_by_args(mox.IgnoreArg(),
host,
@@ -167,12 +171,14 @@ class ServiceTestCase(test.TestCase):
service_create = {'host': host,
'binary': binary,
'topic': topic,
- 'report_count': 0}
+ 'report_count': 0,
+ 'availability_zone': 'nova'}
service_ref = {'host': host,
'binary': binary,
'topic': topic,
'report_count': 0,
- 'id': 1}
+ 'id': 1,
+ 'availability_zone': 'nova'}
service.db.service_get_by_args(mox.IgnoreArg(),
host,
@@ -198,12 +204,14 @@ class ServiceTestCase(test.TestCase):
service_create = {'host': host,
'binary': binary,
'topic': topic,
- 'report_count': 0}
+ 'report_count': 0,
+ 'availability_zone': 'nova'}
service_ref = {'host': host,
'binary': binary,
'topic': topic,
'report_count': 0,
- 'id': 1}
+ 'id': 1,
+ 'availability_zone': 'nova'}
service.db.service_get_by_args(mox.IgnoreArg(),
host,