ctdb_test_env now sets $CTDB_TIMEOUT. Fixed
authorMartin Schwenke <martin@meltin.net>
Wed, 17 Dec 2008 05:59:23 +0000 (16:59 +1100)
committerMartin Schwenke <martin@meltin.net>
Wed, 17 Dec 2008 05:59:23 +0000 (16:59 +1100)
26_ctdb_config_check_error_on_unreachable_ctdb.sh to work with new
generic error message when trying to talk to disconnected node.

Signed-off-by: Martin Schwenke <martin@meltin.net>
tests/scripts/ctdb_test_env
tests/simple/26_ctdb_config_check_error_on_unreachable_ctdb.sh

index 82aa3da9f5f057ba84b0beae4a4138cd4ee47925..398caf36c8bb6b2f00604dd1da886e4dd0d0dc6a 100755 (executable)
@@ -11,6 +11,8 @@ ctdb_test_scripts_dir=$(cd $(dirname $0) ; pwd)
 
 PATH="${ctdb_test_scripts_dir}:${ctdb_tools_dir}:${PATH}"
 
+export CTDB_TIMEOUT=60
+
 ######################################################################
 
 if [ -n "$CTDB_TEST_REMOTE_SCRIPTS_DIR" ] ; then
index 75cd4385e56e00f02f6c236ad0b1b0f43c3b5e99..f3f3b54e2e624afaa8a9c18eb604504f16a66f9b 100755 (executable)
@@ -57,7 +57,9 @@ msg="ctdb_control error: 'ctdb_control to disconnected node'"
 for i in ip disable enable "ban 0" unban listvars ; do
     try_command_on_node -v 0 ! ctdb $i -n $test_node
 
-    if [ "${out/${msg}}" != "$out" ] ; then
+    pat="ctdb_control error: 'ctdb_control to disconnected node'|Node $test_node is DISCONNECTED"
+
+    if egrep -q "$pat" <<<"$out" ; then
        echo "OK: \"ctdb ${i}\" fails with \"disconnected node\""
     else
        echo "BAD: \"ctdb ${i}\" does not fail with \"disconnected node\""