summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/scripts/cluster.bash
blob: 916fc843bada348179ef71f2fec713dc4aaca7e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Hey Emacs, this is a -*- shell-script -*- !!!  :-)

. "${TEST_SCRIPTS_DIR}/integration.bash"

if ! ctdb_test_on_cluster ; then
	# Do not run on local daemons
	ctdb_test_error \
		"ERROR: This test must be run against a real/virtual cluster"
fi

h=$(hostname)

for i in $(onnode -q all hostname) ; do
	if [ "$h" = "$i" ] ; then
		ctdb_test_error \
			"ERROR: This test must not be run from a cluster node"
	fi
done