]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/ceph_argparse: update test for "ceph mds setmap" 7262/head
authorYan, Zheng <zyan@redhat.com>
Wed, 20 Jan 2016 02:43:56 +0000 (10:43 +0800)
committerYan, Zheng <zyan@redhat.com>
Wed, 20 Jan 2016 06:57:54 +0000 (14:57 +0800)
Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/test/pybind/test_ceph_argparse.py

index 53d420f8f87099704f7f428a253fa7e91e20e29f..fede8cf76670e15be3b8d12dec86d7839c266296 100755 (executable)
@@ -381,7 +381,15 @@ class TestMDS(TestArgparse):
         self.check_1_natural_arg('mds', 'set_max_mds')
 
     def test_setmap(self):
-        self.check_1_natural_arg('mds', 'setmap')
+        self.assert_valid_command(['mds', 'setmap', '1'])
+        self.assert_valid_command(['mds', 'setmap', '1', '--yes-i-really-mean-it'])
+        assert_equal({}, validate_command(sigdict, ['mds', 'setmap',
+                                                    '--yes-i-really-mean-it']))
+        assert_equal({}, validate_command(sigdict, ['mds', 'setmap', '-1',
+                                                    '--yes-i-really-mean-it']))
+        assert_equal({}, validate_command(sigdict, ['mds', 'setmap', '1',
+                                                    '--yes-i-really-mean-it',
+                                                    'toomany']))
 
     def test_set_state(self):
         self.assert_valid_command(['mds', 'set_state', '1', '2'])