1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

ctdb-tests: Add cluster.bash include file

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2019-09-11 15:44:20 +10:00 committed by Amitay Isaacs
parent 5ad356c282
commit 653b35764a
3 changed files with 20 additions and 0 deletions

View File

@ -24,5 +24,6 @@ shellcheck_test -s sh \
"${TEST_SCRIPTS_DIR}/script_install_paths.sh"
shellcheck_test -s bash \
"${TEST_SCRIPTS_DIR}/cluster.bash" \
"${TEST_SCRIPTS_DIR}/integration_local_daemons.bash" \
"${TEST_SCRIPTS_DIR}/integration_real_cluster.bash"

18
ctdb/tests/scripts/cluster.bash Executable file
View File

@ -0,0 +1,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

View File

@ -1067,6 +1067,7 @@ def build(bld):
# Install tests/scripts directory, excluding files that need munging
test_scripts = [
'cluster.bash',
'common.sh',
'integration.bash',
'integration_local_daemons.bash',