Merge pull request #8027 from liewegas/wip-reweight-fix

test/pybind/test_ceph_argparse: fix reweight-by-utilization tests

Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Gregory Farnum 2016-03-10 13:03:32 -08:00
commit 740c52d656
2 changed files with 3 additions and 6 deletions

View File

@ -982,7 +982,7 @@ Subcommand ``reweight-by-pg`` reweight OSDs by PG distribution
Usage::
ceph osd reweight-by-pg {<int[100-]>} {<poolname> [<poolname...]}
{--no-increasing} {--yes-i-really-mean-it}
{--no-increasing}
Subcommand ``reweight-by-utilization`` reweight OSDs by utilization
[overload-percentage-for-consideration, default 120].
@ -990,7 +990,7 @@ Subcommand ``reweight-by-utilization`` reweight OSDs by utilization
Usage::
ceph osd reweight-by-utilization {<int[100-]>}
{--no-increasing} {--yes-i-really-mean-it}
{--no-increasing}
Subcommand ``rm`` removes osd(s) <id> [<id>...] in the cluster.

View File

@ -1111,11 +1111,8 @@ class TestOSD(TestArgparse):
def test_reweight_by_utilization(self):
self.assert_valid_command(['osd', 'reweight-by-utilization'])
self.assert_valid_command(['osd', 'reweight-by-utilization', '100'])
self.assert_valid_command(['osd', 'reweight-by-utilization', '100', '.1'])
self.assert_valid_command(['osd', 'reweight-by-utilization', '--no-increasing'])
self.assert_valid_command(['osd', 'reweight-by-utilization', '--yes-i-really-mean-it'])
assert_equal({}, validate_command(sigdict, ['osd',
'reweight-by-utilization',
'50']))
assert_equal({}, validate_command(sigdict, ['osd',
'reweight-by-utilization',
'100',