From 08327fed8213a5d24cd642e12b38a171b98924cb Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Tue, 15 Oct 2013 19:03:25 +0200 Subject: [PATCH] mon: osd pool set syntax relaxed, modify unit tests The argument is no longer restricted to a numerical value. Another variable was added ( hashpspool ) check that it is a valid variable. Signed-off-by: Loic Dachary --- src/test/pybind/test_ceph_argparse.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/test/pybind/test_ceph_argparse.py b/src/test/pybind/test_ceph_argparse.py index 34bcf698e5a..9b16d91108d 100755 --- a/src/test/pybind/test_ceph_argparse.py +++ b/src/test/pybind/test_ceph_argparse.py @@ -941,22 +941,17 @@ class TestOSD(TestArgparse): def test_pool_set(self): for var in ('size', 'min_size', 'crash_replay_interval', - 'pg_num', 'pgp_num', 'crush_ruleset'): + 'pg_num', 'pgp_num', 'crush_ruleset', + 'hashpspool'): self.assert_valid_command(['osd', 'pool', - 'set', 'poolname', var, '-1']) + 'set', 'poolname', var, 'value']) assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'set'])) assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'set', 'poolname'])) assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'set', 'poolname', - 'size', 'invalid'])) - assert_equal({}, validate_command(sigdict, ['osd', 'pool', - 'set', 'poolname', - 'invalid', '-1'])) - assert_equal({}, validate_command(sigdict, ['osd', 'pool', - 'set', 'poolname', - 'size', '-1', + 'size', 'value', 'toomany'])) def test_pool_set_quota(self):