mirror of
https://github.com/ceph/ceph
synced 2025-02-22 18:47:18 +00:00
pybind: fix tests that do not fail as expected
A missing argument make the test fail indeed, but the intended test is to demonstrate something else ( either character validation or excess of arguments etc. ). The result is {} instead of None which is what should have been expected in the first place. Ideally there would be a more verbose way to check for syntactic errors to make such mistakes less probable. Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com> Signed-off-by: Loic Dachary <loic@dachary.org>
This commit is contained in:
parent
cb39b13676
commit
ad09023e1b
@ -695,37 +695,38 @@ class TestOSD(TestArgparse):
|
||||
tunable])
|
||||
assert_equal({}, validate_command(sigdict, ['osd', 'crush',
|
||||
'tunables']))
|
||||
assert_equal(None, validate_command(sigdict, ['osd', 'crush',
|
||||
assert_equal({}, validate_command(sigdict, ['osd', 'crush',
|
||||
'tunables',
|
||||
'default', 'toomany']))
|
||||
|
||||
def test_crush_rule_create_simple(self):
|
||||
self.assert_valid_command(['osd', 'crush', 'rule', 'create-simple',
|
||||
'AZaz09-_.', 'AZaz09-_.', 'AZaz09-_.'])
|
||||
assert_equal(None, validate_command(sigdict, ['osd', 'crush',
|
||||
assert_equal({}, validate_command(sigdict, ['osd', 'crush', 'rule',
|
||||
'create-simple']))
|
||||
assert_equal(None, validate_command(sigdict, ['osd', 'crush',
|
||||
assert_equal({}, validate_command(sigdict, ['osd', 'crush', 'rule',
|
||||
'create-simple',
|
||||
'AZaz09-_.']))
|
||||
assert_equal(None, validate_command(sigdict, ['osd', 'crush',
|
||||
assert_equal({}, validate_command(sigdict, ['osd', 'crush', 'rule',
|
||||
'create-simple',
|
||||
'AZaz09-_.',
|
||||
'AZaz09-_.']))
|
||||
assert_equal(None, validate_command(sigdict, ['osd', 'crush',
|
||||
assert_equal({}, validate_command(sigdict, ['osd', 'crush', 'rule',
|
||||
'create-simple',
|
||||
'!!!',
|
||||
'AZaz09-_.',
|
||||
'AZaz09-_.']))
|
||||
assert_equal(None, validate_command(sigdict, ['osd', 'crush',
|
||||
assert_equal({}, validate_command(sigdict, ['osd', 'crush', 'rule',
|
||||
'create-simple',
|
||||
'AZaz09-_.',
|
||||
'|||',
|
||||
'AZaz09-_.']))
|
||||
assert_equal(None, validate_command(sigdict, ['osd', 'crush',
|
||||
assert_equal({}, validate_command(sigdict, ['osd', 'crush', 'rule',
|
||||
'create-simple',
|
||||
'AZaz09-_.',
|
||||
'AZaz09-_.',
|
||||
'+++']))
|
||||
assert_equal(None, validate_command(sigdict, ['osd', 'crush',
|
||||
assert_equal({}, validate_command(sigdict, ['osd', 'crush', 'rule',
|
||||
'create-simple',
|
||||
'AZaz09-_.',
|
||||
'AZaz09-_.',
|
||||
|
Loading…
Reference in New Issue
Block a user