ctdb-tests: Add cluster.bash include file
[vlendec/samba-autobuild/.git] / ctdb / tests / scripts / cluster.bash
1 # Hey Emacs, this is a -*- shell-script -*- !!!  :-)
2
3 . "${TEST_SCRIPTS_DIR}/integration.bash"
4
5 if ! ctdb_test_on_cluster ; then
6         # Do not run on local daemons
7         ctdb_test_error \
8                 "ERROR: This test must be run against a real/virtual cluster"
9 fi
10
11 h=$(hostname)
12
13 for i in $(onnode -q all hostname) ; do
14         if [ "$h" = "$i" ] ; then
15                 ctdb_test_error \
16                         "ERROR: This test must not be run from a cluster node"
17         fi
18 done