From 5ad356c282044db251c395db06900b249ff07544 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Wed, 18 Sep 2019 11:43:53 +1000 Subject: ctdb-tests: Add function ctdb_test_skip_on_cluster() Use it in relevant tests. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- ctdb/tests/INTEGRATION/simple/cluster.012.reclock_command.sh | 5 +---- ctdb/tests/INTEGRATION/simple/cluster.091.version_check.sh | 5 +---- ctdb/tests/INTEGRATION/simple/eventscripts.001.zero_scripts.sh | 5 +---- ctdb/tests/INTEGRATION/simple/eventscripts.090.debug_hung.sh | 7 ++----- 4 files changed, 5 insertions(+), 17 deletions(-) (limited to 'ctdb/tests/INTEGRATION/simple') diff --git a/ctdb/tests/INTEGRATION/simple/cluster.012.reclock_command.sh b/ctdb/tests/INTEGRATION/simple/cluster.012.reclock_command.sh index 1e1bb1b588f..8199b079610 100755 --- a/ctdb/tests/INTEGRATION/simple/cluster.012.reclock_command.sh +++ b/ctdb/tests/INTEGRATION/simple/cluster.012.reclock_command.sh @@ -15,10 +15,7 @@ EOF set -e -if [ -z "$TEST_LOCAL_DAEMONS" ] ; then - echo "SKIPPING this test - only runs against local daemons" - exit 0 -fi +ctdb_test_skip_on_cluster echo "Starting CTDB with recovery lock command configured..." ctdb_test_init -R diff --git a/ctdb/tests/INTEGRATION/simple/cluster.091.version_check.sh b/ctdb/tests/INTEGRATION/simple/cluster.091.version_check.sh index 5329b49b23a..fccc802b370 100755 --- a/ctdb/tests/INTEGRATION/simple/cluster.091.version_check.sh +++ b/ctdb/tests/INTEGRATION/simple/cluster.091.version_check.sh @@ -11,10 +11,7 @@ EOF set -e -if [ -z "$TEST_LOCAL_DAEMONS" ] ; then - echo "SKIPPING this test - only runs against local daemons" - exit 0 -fi +ctdb_test_skip_on_cluster ctdb_test_init diff --git a/ctdb/tests/INTEGRATION/simple/eventscripts.001.zero_scripts.sh b/ctdb/tests/INTEGRATION/simple/eventscripts.001.zero_scripts.sh index 2e536da5e6a..4e55319000e 100755 --- a/ctdb/tests/INTEGRATION/simple/eventscripts.001.zero_scripts.sh +++ b/ctdb/tests/INTEGRATION/simple/eventscripts.001.zero_scripts.sh @@ -14,10 +14,7 @@ EOF set -e -if [ -z "$TEST_LOCAL_DAEMONS" ] ; then - echo "SKIPPING this test - only runs against local daemons" - exit 0 -fi +ctdb_test_skip_on_cluster ctdb_test_init --no-event-scripts diff --git a/ctdb/tests/INTEGRATION/simple/eventscripts.090.debug_hung.sh b/ctdb/tests/INTEGRATION/simple/eventscripts.090.debug_hung.sh index af045cf785e..9a42af80946 100755 --- a/ctdb/tests/INTEGRATION/simple/eventscripts.090.debug_hung.sh +++ b/ctdb/tests/INTEGRATION/simple/eventscripts.090.debug_hung.sh @@ -19,15 +19,12 @@ EOF set -e +ctdb_test_skip_on_cluster + ctdb_test_init cluster_is_healthy -if [ -z "$TEST_LOCAL_DAEMONS" ] ; then - echo "SKIPPING this test - only runs against local daemons" - exit 0 -fi - # This is overkill but it at least provides a valid test node select_test_node_and_ips -- cgit v1.2.1