]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind: update osd blacklist tests for nonce 650/head
authorLoic Dachary <loic@dachary.org>
Fri, 27 Sep 2013 09:04:08 +0000 (11:04 +0200)
committerLoic Dachary <loic@dachary.org>
Fri, 27 Sep 2013 10:25:39 +0000 (12:25 +0200)
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>
src/test/pybind/test_ceph_argparse.py

index fe7c9baccccc69836667023af8af5d7e2090d093..34bcf698e5a6ec1b43db62afd71039ed41876a40 100755 (executable)
@@ -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']))