Tickle tests fail if run from a node involved in the test.
The condition is actually weaker than this: the test can't be run from
a CTDB node that is hosting public addresses that may be used by the
test.
Rework ctdb_test_check_real_cluster() to support checking this.
Signed-off-by: Martin Schwenke <martin@meltin.net>
ctdb_test_check_real_cluster ()
{
- if [ -z "$TEST_LOCAL_DAEMONS" ] ; then
- return 0
- fi
+ [ -z "$TEST_LOCAL_DAEMONS" ] || \
+ die "ERROR: This test must be run against a real/virtual cluster, not local daemons."
- echo "ERROR: This test must be run on a real/virtual cluster, not local daemons."
- return 1
+ for i in $(onnode -q all hostname) ; do
+ [ "$h" != "$i" ] || \
+ die "ERROR: This test must not be run from a cluster node."
+ done
}