Merge "Change default scheduler to filter_scheduler"
This commit is contained in:
commit
1bb2e5b8aa
@ -21,7 +21,7 @@ scheduler_group = cfg.OptGroup(name="scheduler",
|
||||
|
||||
scheduler_opts = [
|
||||
cfg.StrOpt("driver",
|
||||
default="chance_scheduler",
|
||||
default="filter_scheduler",
|
||||
choices=("chance_scheduler", "fake_scheduler",
|
||||
"filter_scheduler"),
|
||||
help="""
|
||||
|
@ -14,8 +14,8 @@ import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from zun.scheduler import chance_scheduler
|
||||
from zun.scheduler import client as scheduler_client
|
||||
from zun.scheduler import filter_scheduler
|
||||
from zun.tests import base
|
||||
from zun.tests.unit.scheduler import fake_scheduler
|
||||
|
||||
@ -32,14 +32,14 @@ class SchedulerClientTestCase(base.TestCase):
|
||||
|
||||
def test_init_using_default_schedulerdriver(self):
|
||||
driver = self.client_cls().driver
|
||||
self.assertIsInstance(driver, chance_scheduler.ChanceScheduler)
|
||||
self.assertIsInstance(driver, filter_scheduler.FilterScheduler)
|
||||
|
||||
def test_init_using_custom_schedulerdriver(self):
|
||||
CONF.set_override('driver', 'fake_scheduler', group='scheduler')
|
||||
driver = self.client_cls().driver
|
||||
self.assertIsInstance(driver, fake_scheduler.FakeScheduler)
|
||||
|
||||
@mock.patch('zun.scheduler.chance_scheduler.ChanceScheduler'
|
||||
@mock.patch('zun.scheduler.filter_scheduler.FilterScheduler'
|
||||
'.select_destinations')
|
||||
def test_select_destinations(self, mock_select_destinations):
|
||||
fake_args = ['ctxt', 'fake_containers']
|
||||
|
Loading…
x
Reference in New Issue
Block a user