my_exit_hook ()
{
- if [ -z "$TEST_LOCAL_DAEMONS" ] ; then
+ if ctdb_test_on_cluster ; then
onnode -q all $CTDB event script enable legacy "10.interface"
fi
}
# in the middle of a monitor event and will have the expected effect.
wait_for_monitor_event $test_node
-if [ -z "$TEST_LOCAL_DAEMONS" ] ; then
+if ctdb_test_on_cluster ; then
# Stop monitor events from bringing up the link status of an interface
try_command_on_node $test_node $CTDB event script disable legacy 10.interface
fi
######################################################################
+ctdb_test_on_cluster ()
+{
+ [ -z "$TEST_LOCAL_DAEMONS" ]
+}
+
ctdb_test_exit ()
{
local status=$?
try_command_on_node $test_node "$CTDB ip -v -X | awk -F'|' -v ip=$test_ip '\$2 == ip { print \$4 }'"
iface="$out"
- if [ -z "$TEST_LOCAL_DAEMONS" ] ; then
+ if ctdb_test_on_cluster ; then
# Find the netmask
try_command_on_node $test_node ip addr show to $test_ip
mask="${out##*/}"
# Make sure that $CTDB is set.
: ${CTDB:=ctdb}
-if [ -z "$TEST_LOCAL_DAEMONS" ] ; then
+if ctdb_test_on_cluster ; then
. "${TEST_SCRIPTS_DIR}/integration_real_cluster.bash"
else
. "${TEST_SCRIPTS_DIR}/integration_local_daemons.bash"