From e6e8cb8ddd2ca2c058447c0cb93d92cce3275f4a Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Fri, 27 Sep 2013 11:04:08 +0200 Subject: pybind: update osd blacklist tests for nonce Update the unit tests to reflect a) that the nonce is no longer mandatory, b) that it must be an integer. http://tracker.ceph.com/issues/6426 refs #6426 Reviewed-by: Joao Eduardo Luis Signed-off-by: Loic Dachary --- src/test/pybind/test_ceph_argparse.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/test/pybind/test_ceph_argparse.py b/src/test/pybind/test_ceph_argparse.py index fe7c9bacccc..34bcf698e5a 100755 --- a/src/test/pybind/test_ceph_argparse.py +++ b/src/test/pybind/test_ceph_argparse.py @@ -834,20 +834,24 @@ class TestOSD(TestArgparse): def test_blackist(self): for action in ('add', 'rm'): self.assert_valid_command(['osd', 'blacklist', action, - '1.2.3.4/nonce']) + '1.2.3.4/567']) self.assert_valid_command(['osd', 'blacklist', action, - '1.2.3.4/nonce', '600.40']) + '1.2.3.4']) + self.assert_valid_command(['osd', 'blacklist', action, + '1.2.3.4/567', '600.40']) + self.assert_valid_command(['osd', 'blacklist', action, + '1.2.3.4', '600.40']) assert_equal({}, validate_command(sigdict, ['osd', 'blacklist', action, 'invalid', '600.40'])) assert_equal({}, validate_command(sigdict, ['osd', 'blacklist', action, - '1.2.3.4/nonce', + '1.2.3.4/567', '-1.0'])) assert_equal({}, validate_command(sigdict, ['osd', 'blacklist', action, - '1.2.3.4/nonce', + '1.2.3.4/567', '600.40', 'toomany'])) -- cgit v1.2.1