]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: add test_tell, which currently is used only for testing 'ceph tell mon version'. 3272/head
authorMykola Golub <mgolub@mirantis.com>
Tue, 30 Dec 2014 10:03:32 +0000 (12:03 +0200)
committerMykola Golub <mgolub@mirantis.com>
Mon, 5 Jan 2015 13:53:54 +0000 (15:53 +0200)
The test requires at least two monitors run.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
qa/workunits/cephtool/test.sh
src/test/cephtool-test-mon.sh

index 7b9f756fbdc0ad59fd80f127a7ed171b2f456fc9..048ae113b66de89ccaacce8a4779859f7252ec47 100755 (executable)
@@ -1324,6 +1324,22 @@ function test_osd_bench()
   ceph tell osd.0 bench 104857600 2097152
 }
 
+function test_mon_tell()
+{
+  ceph tell mon.a version
+  ceph tell mon.b version
+  expect_false ceph tell mon.foo version
+
+  sleep 1
+
+  ceph_watch_start debug
+  ceph tell mon.a version
+  ceph_watch_wait 'mon.0 \[DBG\] from.*cmd=\[{"prefix": "version"}\]: dispatch'
+
+  ceph_watch_start debug
+  ceph tell mon.b version
+  ceph_watch_wait 'mon.1 \[DBG\] from.*cmd=\[{"prefix": "version"}\]: dispatch'
+}
 
 #
 # New tests should be added to the TESTS array below
@@ -1358,6 +1374,7 @@ MON_TESTS+=" mon_osd_tiered_pool_set"
 MON_TESTS+=" mon_osd_erasure_code"
 MON_TESTS+=" mon_osd_misc"
 MON_TESTS+=" mon_heap_profiler"
+MON_TESTS+=" mon_tell"
 
 OSD_TESTS+=" osd_bench"
 
index 09ac99ba197d2124001b90bf323709c73eea7cc4..d24f774ae63ebd5b9e154d84c6e2435900461059 100755 (executable)
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU Library Public License for more details.
 #
-MON=1 OSD=3 CEPH_START='mon osd' CEPH_PORT=7202 test/vstart_wrapper.sh \
+MON=3 OSD=3 CEPH_START='mon osd' CEPH_PORT=7202 test/vstart_wrapper.sh \
     ../qa/workunits/cephtool/test.sh \
     --test-mon \
     --asok-does-not-need-root