]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits: cephtool: test deprecated commands
authorJoao Eduardo Luis <joao@suse.de>
Fri, 8 May 2015 18:50:35 +0000 (19:50 +0100)
committerJoao Eduardo Luis <joao@suse.de>
Thu, 16 Jul 2015 11:20:02 +0000 (12:20 +0100)
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
qa/workunits/cephtool/test.sh

index afffd3b9ae7fadf15d5c2f2b200caae3c08662d8..bd5187a83233835fc4a540b67dae590dcccd68c1 100755 (executable)
@@ -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"