Re-enable a lot of cinder scheduler tests

This highlight and fixes a NoneType exception in the schedulers
_get_weighted_candidates method

This was originally added to get around the fact that the filter tests
required that cinder was correctly installed on the system. But the
is_cinder_installed condition always returning False and this hid
problems of old packages been installed in our system. Also
930f5891b0 added the setup.py automatically
to run_tests.sh so we can remove this.

See https://review.openstack.org/#/c/20213/ for history.

Fixes bug: 1213226

Change-Id: I86fee802c0543355471ddbd712e52ccec750cea0
This commit is contained in:
Michael Kerrin
2013-08-14 10:16:42 +00:00
parent d2b48cd96d
commit 998bee4a5d
7 changed files with 44 additions and 101 deletions

View File

@@ -222,7 +222,7 @@ class FilterScheduler(driver.Scheduler):
hosts = self.host_manager.get_filtered_hosts(hosts,
filter_properties)
if not hosts:
return None
return []
LOG.debug(_("Filtered %s") % hosts)
# weighted_host = WeightedHost() ... the best