]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test: update argparse tests for "mds rm" 4838/head
authorJohn Spray <john.spray@redhat.com>
Wed, 3 Jun 2015 18:17:40 +0000 (19:17 +0100)
committerJohn Spray <john.spray@redhat.com>
Wed, 3 Jun 2015 18:17:40 +0000 (19:17 +0100)
This tests reflected the bogus old 'who' arg.

Signed-off-by: John Spray <john.spray@redhat.com>
src/test/pybind/test_ceph_argparse.py

index 2be33951d61c90c394d031175aafbd4fd1f6dd54..6bd2b08352636154208d628d8bc198a6f8fba5f6 100755 (executable)
@@ -390,17 +390,13 @@ class TestMDS(TestArgparse):
         self.check_1_string_arg('mds', 'fail')
 
     def test_rm(self):
+        # Valid: single GID argument present
+        self.assert_valid_command(['mds', 'rm', '1'])
+
+        # Missing GID arg: invalid
         assert_equal({}, validate_command(sigdict, ['mds', 'rm']))
-        assert_equal({}, validate_command(sigdict, ['mds', 'rm', '1']))
-        for name in ('osd', 'mon', 'client', 'mds'):
-            self.assert_valid_command(['mds', 'rm', '1', name + '.42'])
-            assert_equal({}, validate_command(sigdict, ['mds', 'rm',
-                                                        '-1', name + '.42']))
-            assert_equal({}, validate_command(sigdict, ['mds', 'rm',
-                                                        '-1', name]))
-            assert_equal({}, validate_command(sigdict, ['mds', 'rm',
-                                                        '1', name + '.42',
-                                                        'toomany']))
+        # Extra arg: invalid
+        assert_equal({}, validate_command(sigdict, ['mds', 'rm', '1', 'mds.42']))
 
     def test_rmfailed(self):
         self.check_1_natural_arg('mds', 'rmfailed')