mirror of
https://github.com/ceph/ceph
synced 2025-02-19 17:08:05 +00:00
cephtool/test.sh: add tests for mon daemon command
[Also move into a separatate test script; validate result -sage] Signed-off-by: Dan Mick <dan.mick@inktank.com> Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
47d0d64d5c
commit
e70e08c060
27
qa/workunits/cephtool/test_daemon.sh
Executable file
27
qa/workunits/cephtool/test_daemon.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
set -e
|
||||
|
||||
expect_false()
|
||||
{
|
||||
set -x
|
||||
if "$@"; then return 1; else return 0; fi
|
||||
}
|
||||
|
||||
echo note: assuming mon.a is on the currenet host
|
||||
|
||||
ceph daemon mon.a version | grep version
|
||||
|
||||
# get debug_ms setting and strip it, painfully for reuse
|
||||
old_ms=$(ceph daemon mon.a config get debug_ms | grep debug_ms | \
|
||||
sed -e 's/.*: //' -e 's/["\}\\]//g')
|
||||
ceph daemon mon.a config set debug_ms 13
|
||||
new_ms=$(ceph daemon mon.a config get debug_ms | grep debug_ms | \
|
||||
sed -e 's/.*: //' -e 's/["\}\\]//g')
|
||||
[ "$new_ms" = "13/13" ]
|
||||
ceph daemon mon.a config set debug_ms $old_ms
|
||||
new_ms=$(ceph daemon mon.a config get debug_ms | grep debug_ms | \
|
||||
sed -e 's/.*: //' -e 's/["\}\\]//g')
|
||||
[ "$new_ms" = "$old_ms" ]
|
||||
|
||||
echo OK
|
Loading…
Reference in New Issue
Block a user