From bd41a2ae0d7720b892f48ba1cea81123ec28002f Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Mon, 13 Feb 2012 13:32:25 +1100 Subject: [PATCH] Tests - simple - make disconnected node tests handle changed error message Recent changes to nodestring parsing generalised the error message logged when trying to talk to a disconnected node. Signed-off-by: Martin Schwenke (This used to be ctdb commit db69a39ca010b2c8853b13466e30792dda350cdb) --- ctdb/tests/simple/09_ctdb_ping.sh | 2 +- .../26_ctdb_config_check_error_on_unreachable_ctdb.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ctdb/tests/simple/09_ctdb_ping.sh b/ctdb/tests/simple/09_ctdb_ping.sh index 401e48dcf34..50612a2512e 100755 --- a/ctdb/tests/simple/09_ctdb_ping.sh +++ b/ctdb/tests/simple/09_ctdb_ping.sh @@ -53,5 +53,5 @@ try_command_on_node -v 0 "! $CTDB ping -n 1" sanity_check_output \ 1 \ - "(: ctdb_control error: ('ctdb_control to disconnected node'|'node is disconnected')|Unable to get ping response from node 1|Node 1 is DISCONNECTED|ctdb_control for getpnn failed|: Can not access node. Node is not operational\.)" \ + "(: ctdb_control error: ('ctdb_control to disconnected node'|'node is disconnected')|Unable to get ping response from node 1|Node 1 is DISCONNECTED|ctdb_control for getpnn failed|: Can not access node. Node is not operational\.|Node 1 has status DISCONNECTED\|UNHEALTHY\|INACTIVE$)" \ "$out" diff --git a/ctdb/tests/simple/26_ctdb_config_check_error_on_unreachable_ctdb.sh b/ctdb/tests/simple/26_ctdb_config_check_error_on_unreachable_ctdb.sh index cddc21c6b00..78541d6e69d 100755 --- a/ctdb/tests/simple/26_ctdb_config_check_error_on_unreachable_ctdb.sh +++ b/ctdb/tests/simple/26_ctdb_config_check_error_on_unreachable_ctdb.sh @@ -54,15 +54,15 @@ try_command_on_node $test_node $CTDB shutdown wait_until_node_has_status $test_node disconnected 30 0 -pat="ctdb_control error: 'ctdb_control to disconnected node'|ctdb_control error: 'node is disconnected'|Node $test_node is DISCONNECTED" +pat="ctdb_control error: 'ctdb_control to disconnected node'|ctdb_control error: 'node is disconnected'|Node $test_node is DISCONNECTED|Node $test_node has status DISCONNECTED\|UNHEALTHY\|INACTIVE" for i in ip disable enable "ban 0" unban listvars ; do try_command_on_node -v 0 ! $CTDB $i -n $test_node if egrep -q "$pat" <<<"$out" ; then - echo "OK: \"ctdb ${i}\" fails with \"disconnected node\"" + echo "OK: \"ctdb ${i}\" fails with expected \"disconnected node\" message" else - echo "BAD: \"ctdb ${i}\" does not fail with \"disconnected node\"" + echo "BAD: \"ctdb ${i}\" does not fail with expected \"disconnected node\" message" exit 1 fi done