From: Joao Eduardo Luis Date: Fri, 8 May 2015 18:50:35 +0000 (+0100) Subject: qa/workunits: cephtool: test deprecated commands X-Git-Tag: v9.0.3~21^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=66e7510cad4e4337dca2c9a269cc9bc921f45ae5;p=ceph.git qa/workunits: cephtool: test deprecated commands Signed-off-by: Joao Eduardo Luis --- diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index afffd3b9ae7..bd5187a8323 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -1621,6 +1621,30 @@ function test_mon_ping() ceph ping mon.* } +function test_mon_deprecated_commands() +{ + # current DEPRECATED commands are: + # ceph compact + # ceph scrub + # ceph sync force + # + # Testing should be accomplished by setting + # 'mon_debug_deprecated_as_obsolete = true' and expecting ENOTSUP for + # each one of these commands. + + ceph tell mon.a injectargs '--mon-debug-deprecated-as-obsolete' + expect_false ceph tell mon.a compact 2> $TMPFILE + check_response "ENOTSUP: command is obsolete" + + expect_false ceph tell mon.a scrub 2> $TMPFILE + check_response "ENOTSUP: command is obsolete" + + expect_false ceph tell mon.a sync force 2> $TMPFILE + check_response "ENOTSUP: command is obsolete" + + ceph tell mon.a injectargs '--no-mon-debug-deprecated-as-obsolete' +} + # # New tests should be added to the TESTS array below # @@ -1657,6 +1681,7 @@ MON_TESTS+=" mon_heap_profiler" MON_TESTS+=" mon_tell" MON_TESTS+=" mon_crushmap_validation" MON_TESTS+=" mon_ping" +MON_TESTS+=" mon_deprecated_commands" OSD_TESTS+=" osd_bench"