summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/complex/scripts
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2012-04-19 11:14:28 +1000
committerMartin Schwenke <martin@meltin.net>2012-04-27 15:40:43 +1000
commitf30d4c575edc9eddddb9445b5d4235d9abcad73a (patch)
treec1f1f9c256b17d1c9c40ffcc2fb6b753898ca42c /ctdb/tests/complex/scripts
parent012015b32c67154fa3c6ef63ae646077e97923a9 (diff)
downloadsamba-f30d4c575edc9eddddb9445b5d4235d9abcad73a.tar.gz
samba-f30d4c575edc9eddddb9445b5d4235d9abcad73a.tar.xz
samba-f30d4c575edc9eddddb9445b5d4235d9abcad73a.zip
tests: Local daemons are no longer the default, now require run_tests -l
Testing with local daemons is the current default but this is not the most common use case. Therefore, we make local daemons optional by using the -l switch with run_tests or by setting TEST_LOCAL_DAEMONS to the number of daemons to be used (-l sets this to 3). TEST_LOCAL_DAEMONS replaces CTDB_TEST_NUM_DAEMONS and CTDB_TEST_REAL_CLUSTER is removed. Most relevant logic is moved from ctdb_test_env to integration.bash. ctdb_test_check_real_cluster() is moved from integration.bash to complex/scripts/local.bash. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 72ecae61c43b318ec94b527a12cbb0a382e8c3db)
Diffstat (limited to 'ctdb/tests/complex/scripts')
-rw-r--r--ctdb/tests/complex/scripts/local.bash10
1 files changed, 10 insertions, 0 deletions
diff --git a/ctdb/tests/complex/scripts/local.bash b/ctdb/tests/complex/scripts/local.bash
index 3ed03ba708..e3cd431e62 100644
--- a/ctdb/tests/complex/scripts/local.bash
+++ b/ctdb/tests/complex/scripts/local.bash
@@ -127,3 +127,13 @@ gratarp_sniff_wait_show ()
}
+ctdb_test_check_real_cluster ()
+{
+ if [ -z "$TEST_LOCAL_DAEMONS" ] ; then
+ return 0
+ fi
+
+ echo "ERROR: This test must be run on a real/virtual cluster, not local daemons."
+ return 1
+}
+