1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
samba-mirror/ctdb/tests/simple/03_ctdb_getvar.sh
Martin Schwenke d741559fa6 Add some simple tests that can be run from within the tree.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit eacb2ef82ea4809d874158756db973dd1e3fc8fc)
2008-11-20 20:40:01 +11:00

28 lines
459 B
Bash
Executable File

#!/bin/bash
. ctdb_test_functions.bash
set -e
onnode 0 $TEST_WRAP cluster_is_healthy
try_command_on_node 0 "ctdb listvars"
echo "Veryifying all variable values using \"ctdb getvar\"..."
echo "$out" |
while read var x val ; do
try_command_on_node 0 "ctdb getvar $var"
val2=$(echo $out | sed -e 's@.*[[:space:]]@@')
if [ "$val" != "$val2" ] ; then
echo "MISMATCH on $var: $val != $val2"
exit 1
fi
done
testfailures=$?
ctdb_test_exit