From: John Spray Date: Wed, 3 Jun 2015 18:17:40 +0000 (+0100) Subject: test: update argparse tests for "mds rm" X-Git-Tag: v9.0.2~19^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=601c2f7cade4670d53c6e4ee9179b7570c03359e;p=ceph.git test: update argparse tests for "mds rm" This tests reflected the bogus old 'who' arg. Signed-off-by: John Spray --- diff --git a/src/test/pybind/test_ceph_argparse.py b/src/test/pybind/test_ceph_argparse.py index 2be33951d61c9..6bd2b08352636 100755 --- a/src/test/pybind/test_ceph_argparse.py +++ b/src/test/pybind/test_ceph_argparse.py @@ -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')