Add marker option for get_instance_list()
Change-Id: Iee31369876052a22e5f3263cd5e7fad5d068f68d
This commit is contained in:
@@ -167,14 +167,14 @@ class TestNovaHelper(base.TestCase):
|
||||
with mock.patch.object(nova_util, 'nova') as nova_mock:
|
||||
result = nova_util.get_instance_list()
|
||||
nova_mock.servers.list.assert_called_once_with(
|
||||
search_opts={'all_tenants': True}, limit=-1)
|
||||
search_opts={'all_tenants': True}, marker=None, limit=-1)
|
||||
self.assertIs(result, nova_mock.servers.list.return_value)
|
||||
# Call it again with filters.
|
||||
with mock.patch.object(nova_util, 'nova') as nova_mock:
|
||||
result = nova_util.get_instance_list(filters={'host': 'fake-host'})
|
||||
nova_mock.servers.list.assert_called_once_with(
|
||||
search_opts={'all_tenants': True, 'host': 'fake-host'},
|
||||
limit=-1)
|
||||
marker=None, limit=-1)
|
||||
self.assertIs(result, nova_mock.servers.list.return_value)
|
||||
|
||||
@mock.patch.object(time, 'sleep', mock.Mock())
|
||||
|
||||
Reference in New Issue
Block a user