Skip to content

Commit

Permalink
Add the service_state into test_schedule_happy_day.
Browse files Browse the repository at this point in the history
Since the fake filter scheduler does not update the capabilities, the sevice
states remains empty. To avoid the None value for free_capacity_gb, we set the
host_manager to a fake host manager with a list of service states.

Fixed Bug 1171906.

Change-Id: I359ea6952392cc5e6b8eff513f3ca4d8161a30e3
  • Loading branch information
Vincent Hou committed May 23, 2013
1 parent b6b43b7 commit 5615204
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cinder/tests/scheduler/test_filter_scheduler.py
Expand Up @@ -96,6 +96,7 @@ def _fake_weigh_objects(_self, functions, hosts, options):
return [weights.WeighedHost(host_state, self.next_weight)]

sched = fakes.FakeFilterScheduler()
sched.host_manager = fakes.FakeHostManager()
fake_context = context.RequestContext('user', 'project',
is_admin=True)

Expand Down

0 comments on commit 5615204

Please sign in to comment.