summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2012-05-23 15:36:01 +1000
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2012-05-25 15:26:18 +1000
commit2d953e6957eddf1f93d9d1895adb5b71badfb7af (patch)
tree058a6b97428703a3f089eeebc2e340284612f0ac
parent1ba9fa2e48368af3907470381e6839bfcc24f71b (diff)
downloadsamba-2d953e6957eddf1f93d9d1895adb5b71badfb7af.tar.gz
samba-2d953e6957eddf1f93d9d1895adb5b71badfb7af.tar.xz
samba-2d953e6957eddf1f93d9d1895adb5b71badfb7af.zip
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)
-rw-r--r--ctdb/tests/complex/scripts/local.bash11
1 files changed, 6 insertions, 5 deletions
diff --git a/ctdb/tests/complex/scripts/local.bash b/ctdb/tests/complex/scripts/local.bash
index e3cd431e62..0976c3f9de 100644
--- a/ctdb/tests/complex/scripts/local.bash
+++ b/ctdb/tests/complex/scripts/local.bash
@@ -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
}