"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>
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()