~ubuntu-branches/ubuntu/utopic/cinder/utopic

« back to all changes in this revision

Viewing changes to cinder/tests/scheduler/test_capacity_weigher.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, James Page, Adam Gandelman, Chuck Short
  • Date: 2013-09-08 21:09:46 UTC
  • mfrom: (1.1.18)
  • Revision ID: package-import@ubuntu.com-20130908210946-3dbzq1jy5uji4wad
Tags: 1:2013.2~b3-0ubuntu1
[ James Page ]
* d/control: Switch ceph-common -> python-ceph inline with upstream
  refactoring of Ceph RBD driver, move to Suggests of python-cinder.
  (LP: #1190791). 

[ Adam Gandelman ]
* debian/patches/avoid_paramiko_vers_depends.patch: Dropped, no longer
  required.
* Add minimum requirement python-greenlet (>= 0.3.2).
* Add minimum requirement python-eventlet (>= 0.12.0).
* Add minimum requirement python-paramiko (>= 1.8).

[ Chuck Short ]
* New upstream release.
* debian/patches/skip-sqlachemy-failures.patch: Skip testfailures
  with sqlalchemy 0.8 until they are fixed upstream.
* debian/control: Add python-babel to build-depends.
* debian/control: Add python-novaclient to build-depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
        self.mox.ResetAll()
49
49
        return host_states
50
50
 
51
 
    @testtools.skipIf(not test_utils.is_cinder_installed(),
52
 
                      'Test requires Cinder installed')
53
51
    def test_default_of_spreading_first(self):
54
52
        hostinfo_list = self._get_all_hosts()
55
53
 
63
61
        self.assertEqual(weighed_host.weight, 921.0)
64
62
        self.assertEqual(weighed_host.obj.host, 'host1')
65
63
 
66
 
    @testtools.skipIf(not test_utils.is_cinder_installed(),
67
 
                      'Test requires Cinder installed')
68
64
    def test_capacity_weight_multiplier1(self):
69
65
        self.flags(capacity_weight_multiplier=-1.0)
70
66
        hostinfo_list = self._get_all_hosts()
79
75
        self.assertEqual(weighed_host.weight, -190.0)
80
76
        self.assertEqual(weighed_host.obj.host, 'host4')
81
77
 
82
 
    @testtools.skipIf(not test_utils.is_cinder_installed(),
83
 
                      'Test requires Cinder installed')
84
78
    def test_capacity_weight_multiplier2(self):
85
79
        self.flags(capacity_weight_multiplier=2.0)
86
80
        hostinfo_list = self._get_all_hosts()