From 601c2f7cade4670d53c6e4ee9179b7570c03359e Mon Sep 17 00:00:00 2001 From: John Spray Date: Wed, 3 Jun 2015 19:17:40 +0100 Subject: [PATCH] test: update argparse tests for "mds rm" This tests reflected the bogus old 'who' arg. Signed-off-by: John Spray --- src/test/pybind/test_ceph_argparse.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/test/pybind/test_ceph_argparse.py b/src/test/pybind/test_ceph_argparse.py index 2be33951d61..6bd2b083526 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') -- 2.47.3