summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Dachary <loic@dachary.org>2013-09-27 11:04:08 +0200
committerLoic Dachary <loic@dachary.org>2013-09-27 12:25:39 +0200
commite6e8cb8ddd2ca2c058447c0cb93d92cce3275f4a (patch)
tree5ab9afea1508a2cb49d424e6dc38c06711ed9a44
parent0bfda470367e9a5d6be931e31d6e0e74616b3c77 (diff)
downloadceph-e6e8cb8ddd2ca2c058447c0cb93d92cce3275f4a.tar.gz
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 <joao.luis@inktank.com> Signed-off-by: Loic Dachary <loic@dachary.org>
-rwxr-xr-xsrc/test/pybind/test_ceph_argparse.py12
1 files 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']))