1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

tests: Complex tests must not be run from a cluster node

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>

(This used to be ctdb commit 14012781c3751a514055df29ea70adfb12ecb2d9)
This commit is contained in:
Martin Schwenke 2012-05-23 15:36:01 +10:00 committed by Ronnie Sahlberg
parent 1ba9fa2e48
commit 2d953e6957

View File

@ -129,11 +129,12 @@ gratarp_sniff_wait_show ()
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
}