1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

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 <martin@meltin.net>

(This used to be ctdb commit db69a39ca010b2c8853b13466e30792dda350cdb)
This commit is contained in:
Martin Schwenke 2012-02-13 13:32:25 +11:00
parent 629553667e
commit bd41a2ae0d
2 changed files with 4 additions and 4 deletions

View File

@ -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"

View File

@ -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