]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/cephtool/test.sh: use "sessions" in test_mon_tell()
authorKefu Chai <kchai@redhat.com>
Mon, 18 Nov 2019 07:36:21 +0000 (15:36 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 18 Nov 2019 09:08:07 +0000 (17:08 +0800)
"version" is not an asok command anymore in the sense that it's served
by registered asock hook. so in this change, we replace "version" with
"sessions", so we can verify that audit channel does not the dispatched
"sessions" command sent from ceph cli.

also, restructure the test as a loop for better readability

Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/workunits/cephtool/test.sh

index a30d856ceb27d1ab0e6662d77be1c989498eebba..8a6d922b6f059b4d0494e1be250afc0e6675f41a 100755 (executable)
@@ -2546,19 +2546,13 @@ function test_osd_negative_filestore_merge_threshold()
 
 function test_mon_tell()
 {
-  ceph tell mon.a version
-  ceph tell mon.b version
+  for m in mon.a mon.b; do
+    ceph tell $m sessions
+    ceph_watch_start debug audit
+    ceph tell mon.a sessions
+    ceph_watch_wait "${m} \[DBG\] from.*cmd='sessions' args=\[\]: dispatch"
+  done
   expect_false ceph tell mon.foo version
-
-  sleep 1
-
-  ceph_watch_start debug audit
-  ceph tell mon.a version
-  ceph_watch_wait 'mon.a \[DBG\] from.*cmd=\[{"prefix": "version"}\]: dispatch'
-
-  ceph_watch_start debug audit
-  ceph tell mon.b version
-  ceph_watch_wait 'mon.b \[DBG\] from.*cmd=\[{"prefix": "version"}\]: dispatch'
 }
 
 function test_mon_ping()