From: Sage Weil Date: Wed, 31 Jul 2013 06:04:41 +0000 (-0700) Subject: cephtool/test.sh: add tests for mon daemon command X-Git-Tag: v0.67~41 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e70e08c060592715cf4e3403532c8239bebce690;p=ceph.git cephtool/test.sh: add tests for mon daemon command [Also move into a separatate test script; validate result -sage] Signed-off-by: Dan Mick Signed-off-by: Sage Weil --- diff --git a/qa/workunits/cephtool/test_daemon.sh b/qa/workunits/cephtool/test_daemon.sh new file mode 100755 index 000000000000..67f0f096e276 --- /dev/null +++ b/qa/workunits/cephtool/test_daemon.sh @@ -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