From: Martin Schwenke Date: Fri, 26 Jul 2019 01:15:05 +0000 (+1000) Subject: ctdb-tests: Add function select_test_node() X-Git-Tag: tdb-1.4.2~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ea95ab4cb70224b96a3f40fed9bb6dcc2abedf7;p=thirdparty%2Fsamba.git ctdb-tests: Add function select_test_node() Should be used when public IP addresses are not assigned. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/scripts/integration.bash b/ctdb/tests/scripts/integration.bash index 30725c48e53..011aeadee40 100644 --- a/ctdb/tests/scripts/integration.bash +++ b/ctdb/tests/scripts/integration.bash @@ -150,6 +150,14 @@ sanity_check_output () return $ret } +select_test_node () +{ + try_command_on_node any ctdb pnn || return 1 + + test_node="$out" + echo "Selected node ${test_node}" +} + # This returns a list of "ip node" lines in $outfile all_ips_on_node() {