summaryrefslogtreecommitdiff
path: root/ctdb/tests/INTEGRATION/simple
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2020-07-22 14:43:24 +1000
committerMartin Schwenke <martins@samba.org>2020-07-22 05:07:46 +0000
commit4438e44f880249164bb33d783f9a773f44ba1a99 (patch)
treef5b5e5d6b8addfc911703efb237194155a64f545 /ctdb/tests/INTEGRATION/simple
parent271ad95e2359b1c4fc6d73c0c8e941bafb85c97c (diff)
downloadsamba-4438e44f880249164bb33d783f9a773f44ba1a99.tar.gz
Revert "ctdb-tests: Update preamble for INTEGRATION tests"
Fix missing Reviewed-by: tag. This reverts commit 65f56505e29c01d5891e5bc1050b6c37b8cbdee7. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/tests/INTEGRATION/simple')
-rwxr-xr-xctdb/tests/INTEGRATION/simple/basics.000.onnode.sh25
-rwxr-xr-xctdb/tests/INTEGRATION/simple/basics.001.listnodes.sh28
-rwxr-xr-xctdb/tests/INTEGRATION/simple/basics.002.tunables.sh13
-rwxr-xr-xctdb/tests/INTEGRATION/simple/basics.003.ping.sh44
-rwxr-xr-xctdb/tests/INTEGRATION/simple/basics.004.getpid.sh28
-rwxr-xr-xctdb/tests/INTEGRATION/simple/basics.005.process_exists.sh34
-rwxr-xr-xctdb/tests/INTEGRATION/simple/basics.010.statistics.sh29
-rwxr-xr-xctdb/tests/INTEGRATION/simple/basics.011.statistics_reset.sh31
-rwxr-xr-xctdb/tests/INTEGRATION/simple/cluster.001.isnotrecmaster.sh30
-rwxr-xr-xctdb/tests/INTEGRATION/simple/cluster.002.recmaster_yield.sh28
-rwxr-xr-xctdb/tests/INTEGRATION/simple/cluster.010.getrelock.sh15
-rwxr-xr-xctdb/tests/INTEGRATION/simple/cluster.012.reclock_command.sh19
-rwxr-xr-xctdb/tests/INTEGRATION/simple/cluster.015.reclock_remove_lock.sh2
-rwxr-xr-xctdb/tests/INTEGRATION/simple/cluster.016.reclock_move_lock_dir.sh2
-rwxr-xr-xctdb/tests/INTEGRATION/simple/cluster.020.message_ring.sh17
-rwxr-xr-xctdb/tests/INTEGRATION/simple/cluster.021.tunnel_ring.sh17
-rwxr-xr-xctdb/tests/INTEGRATION/simple/cluster.090.unreachable.sh40
-rwxr-xr-xctdb/tests/INTEGRATION/simple/cluster.091.version_check.sh11
-rwxr-xr-xctdb/tests/INTEGRATION/simple/debug.001.getdebug.sh26
-rwxr-xr-xctdb/tests/INTEGRATION/simple/debug.002.setdebug.sh19
-rwxr-xr-xctdb/tests/INTEGRATION/simple/debug.003.dumpmemory.sh26
-rwxr-xr-xctdb/tests/INTEGRATION/simple/eventscripts.001.zero_scripts.sh11
-rwxr-xr-xctdb/tests/INTEGRATION/simple/eventscripts.090.debug_hung.sh19
23 files changed, 425 insertions, 89 deletions
diff --git a/ctdb/tests/INTEGRATION/simple/basics.000.onnode.sh b/ctdb/tests/INTEGRATION/simple/basics.000.onnode.sh
index 4ca6e462ad4..7e74c088847 100755
--- a/ctdb/tests/INTEGRATION/simple/basics.000.onnode.sh
+++ b/ctdb/tests/INTEGRATION/simple/basics.000.onnode.sh
@@ -1,12 +1,29 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Use 'onnode' to confirm connectivity between all cluster nodes
+test_info()
+{
+ cat <<EOF
+Use 'onnode' to confirm connectivity between all cluster nodes.
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+Steps:
+
+1. Do a recursive "onnode all" to make sure all the nodes can connect
+ to each other. On a cluster this ensures that SSH keys are known
+ between all hosts, which will stop output being corrupted with
+ messages about nodes being added to the list of known hosts.
-set -e
+Expected results:
+
+* 'onnode' works between all nodes.
+EOF
+}
+
+. "${TEST_SCRIPTS_DIR}/integration.bash"
ctdb_test_init
+
+#
+
echo "Checking connectivity between nodes..."
onnode all onnode -p all hostname
diff --git a/ctdb/tests/INTEGRATION/simple/basics.001.listnodes.sh b/ctdb/tests/INTEGRATION/simple/basics.001.listnodes.sh
index aafe27e6cc1..722c9d2a035 100755
--- a/ctdb/tests/INTEGRATION/simple/basics.001.listnodes.sh
+++ b/ctdb/tests/INTEGRATION/simple/basics.001.listnodes.sh
@@ -1,12 +1,34 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Verify that 'ctdb listnodes' shows the list of nodes
+test_info()
+{
+ cat <<EOF
+Verify that 'ctdb listnodes' shows the list of nodes in a ctdb cluster.
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+
+Steps:
+
+1. Verify that the status on all of the ctdb nodes is 'OK'.
+2. Run 'ctdb listnodes' on all the nodes of the cluster.
+3. Verify that one all the nodes the command displays a list of
+ current cluster nodes.
+
+Expected results:
+
+* 'ctdb listnodes' displays the correct information.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
try_command_on_node -v 0 "$CTDB listnodes"
diff --git a/ctdb/tests/INTEGRATION/simple/basics.002.tunables.sh b/ctdb/tests/INTEGRATION/simple/basics.002.tunables.sh
index 6f362c685b3..2e7a08b6f6f 100755
--- a/ctdb/tests/INTEGRATION/simple/basics.002.tunables.sh
+++ b/ctdb/tests/INTEGRATION/simple/basics.002.tunables.sh
@@ -1,12 +1,19 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Verify the operation of "ctdb listvars", "ctdb getvar", "ctdb setvar"
+test_info()
+{
+ cat <<EOF
+Verify the operation of "ctdb listvars", "ctdb getvar", "ctdb setvar"
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
try_command_on_node -v 0 "$CTDB listvars"
diff --git a/ctdb/tests/INTEGRATION/simple/basics.003.ping.sh b/ctdb/tests/INTEGRATION/simple/basics.003.ping.sh
index 8071762ca40..1ff37b903f7 100755
--- a/ctdb/tests/INTEGRATION/simple/basics.003.ping.sh
+++ b/ctdb/tests/INTEGRATION/simple/basics.003.ping.sh
@@ -1,21 +1,39 @@
-#!/usr/bin/env bash
-
-# Verify the operation of the 'ctdb ping' command
-#
-# 1. Run the 'ctdb ping' command on one of the nodes and verify that it
-# shows valid and expected output.
-# 2. Shutdown one of the cluster nodes, using the 'ctdb shutdown'
-# command.
-# 3. Run the 'ctdb ping -n <node>' command from another node to this
-# node.
-# 4. Verify that the command is not successful since th ctdb daemon is
-# not running on the node.
+#!/bin/bash
+
+test_info()
+{
+ cat <<EOF
+Verify the operation of the 'ctdb ping' command.
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+
+Steps:
+
+1. Verify that the status on all of the ctdb nodes is 'OK'.
+2. Run the 'ctdb ping' command on one of the nodes and verify that it
+ shows valid and expected output.
+3. Shutdown one of the cluster nodes, using the 'ctdb shutdown'
+ command.
+4. Run the 'ctdb ping -n <node>' command from another node to this
+ node.
+5. Verify that the command is not successful since th ctdb daemon is
+ not running on the node.
+
+Expected results:
+
+* The 'ctdb ping' command shows valid and expected output.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
try_command_on_node -v 0 "$CTDB ping -n 1"
diff --git a/ctdb/tests/INTEGRATION/simple/basics.004.getpid.sh b/ctdb/tests/INTEGRATION/simple/basics.004.getpid.sh
index 27025df9309..48540d052b2 100755
--- a/ctdb/tests/INTEGRATION/simple/basics.004.getpid.sh
+++ b/ctdb/tests/INTEGRATION/simple/basics.004.getpid.sh
@@ -1,12 +1,34 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Verify that 'ctdb getpid' works as expected
+test_info()
+{
+ cat <<EOF
+Verify that 'ctdb getpid' works as expected.
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+
+Steps:
+
+1. Verify that the status on all of the ctdb nodes is 'OK'.
+2. Run 'ctdb getpid -n <number>' on the nodes to check the PID of the
+ ctdbd process.
+3. Verify that the output is valid.
+
+Expected results:
+
+* 'ctdb getpid' shows valid output.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
try_command_on_node 0 "$CTDB listnodes | wc -l"
num_nodes="$out"
diff --git a/ctdb/tests/INTEGRATION/simple/basics.005.process_exists.sh b/ctdb/tests/INTEGRATION/simple/basics.005.process_exists.sh
index c6212fda52e..ae331bcec33 100755
--- a/ctdb/tests/INTEGRATION/simple/basics.005.process_exists.sh
+++ b/ctdb/tests/INTEGRATION/simple/basics.005.process_exists.sh
@@ -1,15 +1,39 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Verify that 'ctdb process-exists' shows correct information
+test_info()
+{
+ cat <<EOF
+Verify that 'ctdb process-exists' shows correct information.
+
+The implementation is creative about how it gets PIDs for existing and
+non-existing processes.
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+
+Steps:
+
+1. Verify that the status on all of the ctdb nodes is 'OK'.
+2. On one of the cluster nodes, get the PID of a ctdb client.
+3. Run 'ctdb process-exists <pid>' on the node and verify that the
+ correct output is shown.
+4. Run 'ctdb process-exists <pid>' with a pid of ctdb daemon
+ process and verify that the correct output is shown.
-# The implementation is creative about how it gets PIDs for existing and
-# non-existing processes.
+Expected results:
+
+* 'ctdb process-exists' shows the correct output.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
test_node=1
srvid=0xAE00000012345678
diff --git a/ctdb/tests/INTEGRATION/simple/basics.010.statistics.sh b/ctdb/tests/INTEGRATION/simple/basics.010.statistics.sh
index d97e0353b2e..cda6e5f478e 100755
--- a/ctdb/tests/INTEGRATION/simple/basics.010.statistics.sh
+++ b/ctdb/tests/INTEGRATION/simple/basics.010.statistics.sh
@@ -1,14 +1,35 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Verify that 'ctdb statistics' works as expected
+test_info()
+{
+ cat <<EOF
+Verify that 'ctdb statistics' works as expected.
-# This is pretty superficial and could do more validation.
+This is pretty superficial and could do more validation.
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+
+Steps:
+
+1. Verify that the status on all of the ctdb nodes is 'OK'.
+2. Run 'ctdb statistics' on a node, and verify that the output is
+ valid.
+
+Expected results:
+
+* 'ctdb statistics' shows valid output on all the nodes.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
pattern='^(CTDB version 1|Current time of statistics[[:space:]]*:.*|Statistics collected since[[:space:]]*:.*|Gathered statistics for [[:digit:]]+ nodes|[[:space:]]+[[:alpha:]_]+[[:space:]]+[[:digit:]]+|[[:space:]]+(node|client|timeouts|locks)|[[:space:]]+([[:alpha:]_]+_latency|max_reclock_[[:alpha:]]+)[[:space:]]+[[:digit:]-]+\.[[:digit:]]+[[:space:]]sec|[[:space:]]*(locks_latency|reclock_ctdbd|reclock_recd|call_latency|lockwait_latency|childwrite_latency)[[:space:]]+MIN/AVG/MAX[[:space:]]+[-.[:digit:]]+/[-.[:digit:]]+/[-.[:digit:]]+ sec out of [[:digit:]]+|[[:space:]]+(hop_count_buckets|lock_buckets):[[:space:][:digit:]]+)$'
diff --git a/ctdb/tests/INTEGRATION/simple/basics.011.statistics_reset.sh b/ctdb/tests/INTEGRATION/simple/basics.011.statistics_reset.sh
index 51f34d9f034..1dce7b39965 100755
--- a/ctdb/tests/INTEGRATION/simple/basics.011.statistics_reset.sh
+++ b/ctdb/tests/INTEGRATION/simple/basics.011.statistics_reset.sh
@@ -1,15 +1,36 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Verify that 'ctdb statisticsreset' works as expected
+test_info()
+{
+ cat <<EOF
+Verify that 'ctdb statisticsreset' works as expected.
+
+This is pretty superficial. It just checks that a few particular
+items reduce.
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+
+Steps:
+
+1. Verify that the status on all of the ctdb nodes is 'OK'.
+2. Run 'ctdb statisticsreset' on all nodes and verify that it executes
+ successfully.
-# This is pretty superficial. It just checks that a few particular
-# items reduce.
+Expected results:
+
+* 'ctdb statisticsreset' executes successfully.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
try_command_on_node 0 "$CTDB listnodes | wc -l"
num_nodes="$out"
diff --git a/ctdb/tests/INTEGRATION/simple/cluster.001.isnotrecmaster.sh b/ctdb/tests/INTEGRATION/simple/cluster.001.isnotrecmaster.sh
index 7d8620bc2f5..68e22879ba3 100755
--- a/ctdb/tests/INTEGRATION/simple/cluster.001.isnotrecmaster.sh
+++ b/ctdb/tests/INTEGRATION/simple/cluster.001.isnotrecmaster.sh
@@ -1,12 +1,36 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Verify the operation of 'ctdb isnotrecmaster'
+test_info()
+{
+ cat <<EOF
+Verify the operation of 'ctdb isnotrecmaster'.
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+
+Steps:
+
+1. Verify that the status on all of the ctdb nodes is 'OK'.
+2. Run 'ctdb isnotrecmaster' on each node.
+
+3. Verify that only 1 node shows the output 'This node is the
+ recmaster' and all the other nodes show the output 'This node is
+ not the recmaster'.
+
+Expected results:
+
+* 'ctdb isnotrecmaster' shows the correct output.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
cmd="$CTDB isnotrecmaster || true"
try_command_on_node -v all "$cmd"
diff --git a/ctdb/tests/INTEGRATION/simple/cluster.002.recmaster_yield.sh b/ctdb/tests/INTEGRATION/simple/cluster.002.recmaster_yield.sh
index 67406dc29d2..f32a784863f 100755
--- a/ctdb/tests/INTEGRATION/simple/cluster.002.recmaster_yield.sh
+++ b/ctdb/tests/INTEGRATION/simple/cluster.002.recmaster_yield.sh
@@ -1,12 +1,34 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Verify that 'ctdb stop' causes a node to yield the recovery master role
+test_info()
+{
+ cat <<EOF
+Verify that 'ctdb stop' causes a node to yield the recovery master role.
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+
+Steps:
+
+1. Determine which node is the recmaster.
+2. Stop this node using the 'ctdb stop' command.
+3. Verify that the status of the node changes to 'stopped'.
+4. Verify that this node no longer has the recovery master role.
+
+Expected results:
+
+* The 'ctdb stop' command causes a node to yield the recmaster role.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
echo "Finding out which node is the recovery master..."
try_command_on_node -v 0 "$CTDB recmaster"
diff --git a/ctdb/tests/INTEGRATION/simple/cluster.010.getrelock.sh b/ctdb/tests/INTEGRATION/simple/cluster.010.getrelock.sh
index 58633af973d..8cedd34045b 100755
--- a/ctdb/tests/INTEGRATION/simple/cluster.010.getrelock.sh
+++ b/ctdb/tests/INTEGRATION/simple/cluster.010.getrelock.sh
@@ -1,14 +1,21 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Verify that "ctdb getreclock" gets the recovery lock correctly
+test_info()
+{
+ cat <<EOF
+Verify that "ctdb getreclock" gets the recovery lock correctly.
-# Make sure the recovery lock is consistent across all nodes.
+Make sure the recovery lock is consistent across all nodes.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
echo "Check that recovery lock is set the same on all nodes..."
try_command_on_node -v -q all $CTDB getreclock
diff --git a/ctdb/tests/INTEGRATION/simple/cluster.012.reclock_command.sh b/ctdb/tests/INTEGRATION/simple/cluster.012.reclock_command.sh
index 76be340d7cb..8199b079610 100755
--- a/ctdb/tests/INTEGRATION/simple/cluster.012.reclock_command.sh
+++ b/ctdb/tests/INTEGRATION/simple/cluster.012.reclock_command.sh
@@ -1,10 +1,15 @@
-#!/usr/bin/env bash
-
-# Check that CTDB operates correctly if the recovery lock is configured
-# as a command.
-
-# This test works only with local daemons. On a real cluster it has
-# no way of updating configuration.
+#!/bin/bash
+
+test_info()
+{
+ cat <<EOF
+Check that CTDB operates correctly if the recovery lock is configured
+as a command.
+
+This test only does anything with local daemons. On a real cluster it
+has no way of updating configuration.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
diff --git a/ctdb/tests/INTEGRATION/simple/cluster.015.reclock_remove_lock.sh b/ctdb/tests/INTEGRATION/simple/cluster.015.reclock_remove_lock.sh
index eccf0bea9da..d74bcf819b4 100755
--- a/ctdb/tests/INTEGRATION/simple/cluster.015.reclock_remove_lock.sh
+++ b/ctdb/tests/INTEGRATION/simple/cluster.015.reclock_remove_lock.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/bash
# Verify that the cluster recovers if the recovery lock is removed.
diff --git a/ctdb/tests/INTEGRATION/simple/cluster.016.reclock_move_lock_dir.sh b/ctdb/tests/INTEGRATION/simple/cluster.016.reclock_move_lock_dir.sh
index e6f63417abd..cd193f05a49 100755
--- a/ctdb/tests/INTEGRATION/simple/cluster.016.reclock_move_lock_dir.sh
+++ b/ctdb/tests/INTEGRATION/simple/cluster.016.reclock_move_lock_dir.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/bash
# Verify that if the directory containing the recovery lock is moved
# then all nodes are banned (because they can't take the lock).
diff --git a/ctdb/tests/INTEGRATION/simple/cluster.020.message_ring.sh b/ctdb/tests/INTEGRATION/simple/cluster.020.message_ring.sh
index b841f5b02f2..6f90c8fd5bb 100755
--- a/ctdb/tests/INTEGRATION/simple/cluster.020.message_ring.sh
+++ b/ctdb/tests/INTEGRATION/simple/cluster.020.message_ring.sh
@@ -1,12 +1,23 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Run the message_ring test and sanity check the output
+test_info()
+{
+ cat <<EOF
+Run the message_ring test and sanity check the output.
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
try_command_on_node 0 "$CTDB listnodes | wc -l"
num_nodes="$out"
diff --git a/ctdb/tests/INTEGRATION/simple/cluster.021.tunnel_ring.sh b/ctdb/tests/INTEGRATION/simple/cluster.021.tunnel_ring.sh
index f86d0802218..c78c4209ea6 100755
--- a/ctdb/tests/INTEGRATION/simple/cluster.021.tunnel_ring.sh
+++ b/ctdb/tests/INTEGRATION/simple/cluster.021.tunnel_ring.sh
@@ -1,12 +1,23 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Run tunnel_test and sanity check the output
+test_info()
+{
+ cat <<EOF
+Run tunnel_test and sanity check the output.
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
try_command_on_node 0 "$CTDB listnodes | wc -l"
num_nodes="$out"
diff --git a/ctdb/tests/INTEGRATION/simple/cluster.090.unreachable.sh b/ctdb/tests/INTEGRATION/simple/cluster.090.unreachable.sh
index 2835e55cd97..d7c0c0f9100 100755
--- a/ctdb/tests/INTEGRATION/simple/cluster.090.unreachable.sh
+++ b/ctdb/tests/INTEGRATION/simple/cluster.090.unreachable.sh
@@ -1,16 +1,44 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Verify an error occurs if a ctdb command is run against a node
-# without a ctdbd
+test_info()
+{
+ cat <<EOF
+Verify an error occurs if a ctdb command is run against a node without a ctdbd.
-# That is, check that an error message is printed if an attempt is made
-# to execute a ctdb command against a node that is not running ctdbd.
+That is, check that an error message is printed if an attempt is made
+to execute a ctdb command against a node that is not running ctdbd.
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+
+Steps:
+
+1. Verify that the status on all of the ctdb nodes is 'OK'.
+2. Shutdown ctdb on a node using 'ctdb shutdown -n <node>'.
+3. Verify that the status of the node changes to 'DISCONNECTED'.
+4. Now run 'ctdb ip -n <node>' from another node.
+5. Verify that an error message is printed stating that the node is
+ disconnected.
+6. Execute some other commands against the shutdown node. For example,
+ disable, enable, ban, unban, listvars.
+7. For each command, verify that an error message is printed stating
+ that the node is disconnected.
+
+Expected results:
+
+* For a node on which ctdb is not running, all commands display an
+ error message stating that the node is disconnected.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
test_node=1
diff --git a/ctdb/tests/INTEGRATION/simple/cluster.091.version_check.sh b/ctdb/tests/INTEGRATION/simple/cluster.091.version_check.sh
index be7175036dc..fa934e8bef1 100755
--- a/ctdb/tests/INTEGRATION/simple/cluster.091.version_check.sh
+++ b/ctdb/tests/INTEGRATION/simple/cluster.091.version_check.sh
@@ -1,6 +1,11 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Check that the CTDB version consistency checking operates correctly
+test_info()
+{
+ cat <<EOF
+Check that the CTDB version consistency checking operates correctly.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
@@ -10,6 +15,8 @@ ctdb_test_skip_on_cluster
ctdb_test_init
+cluster_is_healthy
+
select_test_node
try_command_on_node -v "$test_node" ctdb version
diff --git a/ctdb/tests/INTEGRATION/simple/debug.001.getdebug.sh b/ctdb/tests/INTEGRATION/simple/debug.001.getdebug.sh
index 2220a208125..979392f9a1d 100755
--- a/ctdb/tests/INTEGRATION/simple/debug.001.getdebug.sh
+++ b/ctdb/tests/INTEGRATION/simple/debug.001.getdebug.sh
@@ -1,12 +1,32 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Verify that 'ctdb getdebug' works as expected
+test_info()
+{
+ cat <<EOF
+Verify that 'ctdb getdebug' works as expected.
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+
+Steps:
+
+1. Verify that the status on all of the ctdb nodes is 'OK'.
+2. Get the current debug level on a node, using 'ctdb getdebug -n <node>'.
+
+Expected results:
+
+* 'ctdb getdebug' shows the debug level on all the nodes.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
try_command_on_node 0 "$CTDB listnodes | wc -l"
num_nodes="$out"
diff --git a/ctdb/tests/INTEGRATION/simple/debug.002.setdebug.sh b/ctdb/tests/INTEGRATION/simple/debug.002.setdebug.sh
index dd5949eec77..3e04ca33733 100755
--- a/ctdb/tests/INTEGRATION/simple/debug.002.setdebug.sh
+++ b/ctdb/tests/INTEGRATION/simple/debug.002.setdebug.sh
@@ -1,16 +1,23 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Verify that 'ctdb setdebug' works as expected.
+test_info()
+{
+ cat <<EOF
+Verify that 'ctdb setdebug' works as expected.
-# This is a little superficial. It checks that CTDB thinks the debug
-# level has been changed but doesn't actually check that logging occurs
-# at the new level.
+This is a little superficial. It checks that CTDB thinks the debug
+level has been changed but doesn't actually check that logging occurs
+at the new level.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
select_test_node
diff --git a/ctdb/tests/INTEGRATION/simple/debug.003.dumpmemory.sh b/ctdb/tests/INTEGRATION/simple/debug.003.dumpmemory.sh
index 6205c27c6ca..3d976c17d0f 100755
--- a/ctdb/tests/INTEGRATION/simple/debug.003.dumpmemory.sh
+++ b/ctdb/tests/INTEGRATION/simple/debug.003.dumpmemory.sh
@@ -1,12 +1,32 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Verify that 'ctdb dumpmemory' shows expected output
+test_info()
+{
+ cat <<EOF
+Verify that 'ctdb dumpmemory' shows expected output.
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+
+Steps:
+
+1. Verify that the status on all of the ctdb nodes is 'OK'.
+2. Run 'ctdb dumpmemory' and verify that it shows expected output
+
+Expected results:
+
+* 'ctdb dumpmemory' sows valid output.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
pat='^([[:space:]].+[[:space:]]+contains[[:space:]]+[[:digit:]]+ bytes in[[:space:]]+[[:digit:]]+ blocks \(ref [[:digit:]]+\)[[:space:]]+0x[[:xdigit:]]+|[[:space:]]+reference to: .+|full talloc report on .+ \(total[[:space:]]+[[:digit:]]+ bytes in [[:digit:]]+ blocks\))$'
diff --git a/ctdb/tests/INTEGRATION/simple/eventscripts.001.zero_scripts.sh b/ctdb/tests/INTEGRATION/simple/eventscripts.001.zero_scripts.sh
index fb1d031e982..4e55319000e 100755
--- a/ctdb/tests/INTEGRATION/simple/eventscripts.001.zero_scripts.sh
+++ b/ctdb/tests/INTEGRATION/simple/eventscripts.001.zero_scripts.sh
@@ -1,7 +1,14 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Check that CTDB operates correctly if there are 0 event scripts
+test_info()
+{
+ cat <<EOF
+Check that CTDB operated correctly if there are 0 event scripts
+This test only does anything with local daemons. On a real cluster it
+has no way of updating configuration.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
diff --git a/ctdb/tests/INTEGRATION/simple/eventscripts.090.debug_hung.sh b/ctdb/tests/INTEGRATION/simple/eventscripts.090.debug_hung.sh
index 046989cabb1..0e39496155e 100755
--- a/ctdb/tests/INTEGRATION/simple/eventscripts.090.debug_hung.sh
+++ b/ctdb/tests/INTEGRATION/simple/eventscripts.090.debug_hung.sh
@@ -1,6 +1,19 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Verify CTDB's debugging of timed out eventscripts
+test_info()
+{
+ cat <<EOF
+Verify CTDB's debugging of timed out eventscripts
+
+Prerequisites:
+
+* An active CTDB cluster with monitoring enabled
+
+Expected results:
+
+* When an eventscript times out the correct debugging is executed.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
@@ -10,6 +23,8 @@ ctdb_test_skip_on_cluster
ctdb_test_init
+cluster_is_healthy
+
select_test_node
####################