]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-tests: Update preamble for CLUSTER tests
authorMartin Schwenke <martin@meltin.net>
Wed, 11 Sep 2019 06:07:49 +0000 (16:07 +1000)
committerAmitay Isaacs <amitay@samba.org>
Fri, 4 Oct 2019 09:41:28 +0000 (09:41 +0000)
The main change is to source cluster.bash instead of integration.bash.

While touching the preamble, the following additional changes are also
made:

* Drop test_info() definition and replace it with a comment

  The use of test_info() is pointless.

* Drop call to ctdb_test_check_real_cluster()

  cluster.bash now does this.

* Drop call to cluster_is_healthy()

  This is a holdover from when the previous test would restart daemons
  to get things ready for a test.  There was also a bug where going
  into recovery during the restart would sometimes cause the cluster
  to become unhealthy.  If we really need something like this then we
  can add it to ctdb_test_init().

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
16 files changed:
ctdb/tests/CLUSTER/complex/11_ctdb_delip_removes_ip.sh
ctdb/tests/CLUSTER/complex/18_ctdb_reloadips.sh
ctdb/tests/CLUSTER/complex/30_nfs_tickle_killtcp.sh
ctdb/tests/CLUSTER/complex/31_nfs_tickle.sh
ctdb/tests/CLUSTER/complex/32_cifs_tickle.sh
ctdb/tests/CLUSTER/complex/33_gratuitous_arp.sh
ctdb/tests/CLUSTER/complex/34_nfs_tickle_restart.sh
ctdb/tests/CLUSTER/complex/36_smb_reset_server.sh
ctdb/tests/CLUSTER/complex/37_nfs_reset_server.sh
ctdb/tests/CLUSTER/complex/41_failover_ping_discrete.sh
ctdb/tests/CLUSTER/complex/42_failover_ssh_hostname.sh
ctdb/tests/CLUSTER/complex/43_failover_nfs_basic.sh
ctdb/tests/CLUSTER/complex/44_failover_nfs_oneway.sh
ctdb/tests/CLUSTER/complex/45_failover_nfs_kill.sh
ctdb/tests/CLUSTER/complex/60_rogueip_releaseip.sh
ctdb/tests/CLUSTER/complex/61_rogueip_takeip.sh

index 543472c0f222bcc2682e218ff59df10c2939de14..dba6d075c8df111e2561c7d0f399fc39bb64585a 100755 (executable)
@@ -1,24 +1,15 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that a node's public IP address can be deleted using 'ctdb deleteip'.
+# Verify that a node's public IP address can be deleted using 'ctdb deleteip'.
 
-This is an extended version of simple/17_ctdb_config_delete_ip.sh
-EOF
-}
+# This is an extended version of simple/17_ctdb_config_delete_ip.sh
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 select_test_node_and_ips
 get_test_ip_mask_and_iface
 
index 2678213043028541bbfeae1542dd06716439cc6e..f4df2b1b08b2140fb48adb50ccc7f578f93ed9d2 100755 (executable)
@@ -1,38 +1,29 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that adding/deleting IPs using 'ctdb reloadips' works
+# Verify that adding/deleting IPs using 'ctdb reloadips' works
 
-Checks that when IPs are added to and deleted from a single node then
-those IPs are actually assigned and unassigned from the specified
-interface.
+Checks that when IPs are added to and deleted from a single node then
+those IPs are actually assigned and unassigned from the specified
+interface.
 
-Prerequisites:
+Prerequisites:
 
-* An active CTDB cluster with public IP addresses configured
+* An active CTDB cluster with public IP addresses configured
 
-Expected results:
+Expected results:
 
-* When IPs are added to a single node then they are assigned to an
-  interface.
+* When IPs are added to a single node then they are assigned to an
+  interface.
 
-* When IPs are deleted from a single node then they disappear from an
-  interface.
-EOF
-}
+# * When IPs are deleted from a single node then they disappear from an
+#   interface.
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 select_test_node_and_ips
 
 ####################
index a9b86d42d62fca11ba5460a93d6cc085bf1f464b..4d8f6174d86b09369db6f266f5e29a6b28a3fb14 100755 (executable)
@@ -1,42 +1,33 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that NFS connections are monitored and that NFS tickles are sent.
+# Verify that NFS connections are monitored and that NFS tickles are sent.
 
-Create a connection to the NFS server on a node. Then disable the
-relevant NFS server node and ensure that it sends an appropriate reset
-packet.  The packet must come from the releasing node.
+Create a connection to the NFS server on a node. Then disable the
+relevant NFS server node and ensure that it sends an appropriate reset
+packet.  The packet must come from the releasing node.
 
-Prerequisites:
+Prerequisites:
 
-* An active CTDB cluster with at least 2 nodes with public addresses.
+* An active CTDB cluster with at least 2 nodes with public addresses.
 
-* Test must be run on a real or virtual cluster rather than against
-  local daemons.
+* Test must be run on a real or virtual cluster rather than against
+  local daemons.
 
-* Test must not be run from a cluster node.
+* Test must not be run from a cluster node.
 
-* Cluster nodes must be listening on the NFS TCP port (2049).
+* Cluster nodes must be listening on the NFS TCP port (2049).
 
-Expected results:
+Expected results:
 
-* CTDB on the releasing node should correctly send a reset packet when
-  the node is disabled.
-EOF
-}
+# * CTDB on the releasing node should correctly send a reset packet when
+#   the node is disabled.
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 select_test_node_and_ips
 
 test_port=2049
index 099527a3eb0832b8f32d14b027ecc48341023628..e3c362c347ae00a6d4e491b150ca43d62aa77a81 100755 (executable)
@@ -1,43 +1,34 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that NFS connections are monitored and that NFS tickles are sent.
+# Verify that NFS connections are monitored and that NFS tickles are sent.
 
-We create a connection to the NFS server on a node and confirm that
-this connection is registered in the nfs-tickles/ subdirectory in
-shared storage.  Then kill ctdbd on the relevant NFS server node and
-ensure that the takeover node sends an appropriate reset packet.
+We create a connection to the NFS server on a node and confirm that
+this connection is registered in the nfs-tickles/ subdirectory in
+shared storage.  Then kill ctdbd on the relevant NFS server node and
+ensure that the takeover node sends an appropriate reset packet.
 
-Prerequisites:
+Prerequisites:
 
-* An active CTDB cluster with at least 2 nodes with public addresses.
+* An active CTDB cluster with at least 2 nodes with public addresses.
 
-* Test must be run on a real or virtual cluster rather than against
-  local daemons.
+* Test must be run on a real or virtual cluster rather than against
+  local daemons.
 
-* Test must not be run from a cluster node.
+* Test must not be run from a cluster node.
 
-* Cluster nodes must be listening on the NFS TCP port (2049).
+* Cluster nodes must be listening on the NFS TCP port (2049).
 
-Expected results:
+Expected results:
 
-* CTDB should correctly record the socket and on failover the takeover
-  node should send a reset packet.
-EOF
-}
+# * CTDB should correctly record the socket and on failover the takeover
+#   node should send a reset packet.
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 # We need this for later, so we know how long to run nc for.
 try_command_on_node any $CTDB getvar MonitorInterval
 monitor_interval="${out#*= }"
index bfe3df4e82f511ae83d865a9c66f111a87d862f6..c5b583d4cc3a8145e415f8f4d3c9168a77f09675 100755 (executable)
@@ -1,43 +1,34 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that CIFS connections are monitored and that CIFS tickles are sent.
+# Verify that CIFS connections are monitored and that CIFS tickles are sent.
 
-We create a connection to the CIFS server on a node and confirm that
-this connection is registered by CTDB.  Then disable the relevant CIFS
-server node and ensure that the takeover node sends an appropriate
-reset packet.
+We create a connection to the CIFS server on a node and confirm that
+this connection is registered by CTDB.  Then disable the relevant CIFS
+server node and ensure that the takeover node sends an appropriate
+reset packet.
 
-Prerequisites:
+Prerequisites:
 
-* An active CTDB cluster with at least 2 nodes with public addresses.
+* An active CTDB cluster with at least 2 nodes with public addresses.
 
-* Test must be run on a real or virtual cluster rather than against
-  local daemons.
+* Test must be run on a real or virtual cluster rather than against
+  local daemons.
 
-* Test must not be run from a cluster node.
+* Test must not be run from a cluster node.
 
-* Clustered Samba must be listening on TCP port 445.
+* Clustered Samba must be listening on TCP port 445.
 
-Expected results:
+Expected results:
 
-* CTDB should correctly record the connection and the takeover node
-  should send a reset packet.
-EOF
-}
+# * CTDB should correctly record the connection and the takeover node
+#   should send a reset packet.
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 # We need this for later, so we know how long to sleep.
 try_command_on_node 0 $CTDB getvar MonitorInterval
 monitor_interval="${out#*= }"
index f67a1fac71b8367bc3b176cff79d34d0f2ea6853..7a0944fc8290cfec7c9a0e7ce03d783a74f0a781 100755 (executable)
@@ -1,53 +1,44 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that a gratuitous ARP is sent when a node is failed out.
+# Verify that a gratuitous ARP is sent when a node is failed out.
 
-We ping a public IP and lookup the MAC address in the ARP table.  We
-then disable the node and check the ARP table again - the MAC address
-should have changed.  This test does NOT test connectivity after the
-failover.
+We ping a public IP and lookup the MAC address in the ARP table.  We
+then disable the node and check the ARP table again - the MAC address
+should have changed.  This test does NOT test connectivity after the
+failover.
 
-Prerequisites:
+Prerequisites:
 
-* An active CTDB cluster with at least 2 nodes with public addresses.
+* An active CTDB cluster with at least 2 nodes with public addresses.
 
-* Test must be run on a real or virtual cluster rather than against
-  local daemons.
+* Test must be run on a real or virtual cluster rather than against
+  local daemons.
 
-* Test must not be run from a cluster node.
+* Test must not be run from a cluster node.
 
-Steps:
+Steps:
 
-1. Verify that the cluster is healthy.
-2. Select a public address and its corresponding node.
-3. Remove any entries for the chosen address from the ARP table.
-4. Send a single ping request packet to the selected public address.
-5. Determine the MAC address corresponding to the public address by
-   checking the ARP table.
-6. Disable the selected node.
-7. Check the ARP table and check the MAC associated with the public
-   address.
+1. Verify that the cluster is healthy.
+2. Select a public address and its corresponding node.
+3. Remove any entries for the chosen address from the ARP table.
+4. Send a single ping request packet to the selected public address.
+5. Determine the MAC address corresponding to the public address by
+   checking the ARP table.
+6. Disable the selected node.
+7. Check the ARP table and check the MAC associated with the public
+   address.
 
-Expected results:
+Expected results:
 
-* When a node is disabled the MAC address associated with public
-  addresses on that node should change.
-EOF
-}
+# * When a node is disabled the MAC address associated with public
+#   addresses on that node should change.
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 select_test_node_and_ips
 
 echo "Removing ${test_ip} from the local ARP table..."
index aceebc875b1c44f6e5fffef114b1b9e9b4a9ff89..04d87af1b2ec1382fece6e14fe81724b555981b5 100755 (executable)
@@ -1,41 +1,32 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that a newly started CTDB node gets updated tickle details
+# Verify that a newly started CTDB node gets updated tickle details
 
-Prerequisites:
+Prerequisites:
 
-* An active CTDB cluster with at least 2 nodes with public addresses.
+* An active CTDB cluster with at least 2 nodes with public addresses.
 
-* Test must be run on a real or virtual cluster rather than against
-  local daemons.
+* Test must be run on a real or virtual cluster rather than against
+  local daemons.
 
-* Cluster nodes must be listening on the NFS TCP port (2049).
+* Cluster nodes must be listening on the NFS TCP port (2049).
 
-Steps:
+Steps:
 
-As with 31_nfs_tickle.sh but restart a node after the tickle is
-registered.
+As with 31_nfs_tickle.sh but restart a node after the tickle is
+registered.
 
-Expected results:
+Expected results:
 
-* CTDB should correctly communicated tickles to new CTDB instances as
-  they join the cluster.
-EOF
-}
+# * CTDB should correctly communicated tickles to new CTDB instances as
+#   they join the cluster.
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 # We need this for later, so we know how long to run nc for.
 try_command_on_node any $CTDB getvar MonitorInterval
 monitor_interval="${out#*= }"
index 870b80661aa9545cbbb9c3921ad16040dd21a886..d0f3d081146235420273c9ff2d79a417613b7dc5 100755 (executable)
@@ -1,38 +1,29 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that the server end of an SMB connection is correctly reset
+# Verify that the server end of an SMB connection is correctly reset
 
-Prerequisites:
+Prerequisites:
 
-* An active CTDB cluster with at least 2 nodes with public addresses.
+* An active CTDB cluster with at least 2 nodes with public addresses.
 
-* Test must be run on a real or virtual cluster rather than against
-  local daemons.
+* Test must be run on a real or virtual cluster rather than against
+  local daemons.
 
-* Test must not be run from a cluster node.
+* Test must not be run from a cluster node.
 
-* Clustered Samba must be listening on TCP port 445.
+* Clustered Samba must be listening on TCP port 445.
 
-Expected results:
+Expected results:
 
-* CTDB should correctly record the connection and the releasing node
-  should reset the server end of the connection.
-EOF
-}
+# * CTDB should correctly record the connection and the releasing node
+#   should reset the server end of the connection.
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 # We need this for later, so we know how long to sleep.
 try_command_on_node 0 $CTDB getvar MonitorInterval
 monitor_interval="${out#*= }"
index 32ff9295cc6711141f3d3752d28a44ff26943048..3e249f9483a300e6194c784c48d2eef75b16052f 100755 (executable)
@@ -1,38 +1,29 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that the server end of an NFS connection is correctly reset
+# Verify that the server end of an NFS connection is correctly reset
 
-Prerequisites:
+Prerequisites:
 
-* An active CTDB cluster with at least 2 nodes with public addresses.
+* An active CTDB cluster with at least 2 nodes with public addresses.
 
-* Test must be run on a real or virtual cluster rather than against
-  local daemons.
+* Test must be run on a real or virtual cluster rather than against
+  local daemons.
 
-* Test must not be run from a cluster node.
+* Test must not be run from a cluster node.
 
-* Cluster nodes must be listening on the NFS TCP port (2049).
+* Cluster nodes must be listening on the NFS TCP port (2049).
 
-Expected results:
+Expected results:
 
-* CTDB should correctly record the connection and the releasing node
-  should reset the server end of the connection.
-EOF
-}
+# * CTDB should correctly record the connection and the releasing node
+#   should reset the server end of the connection.
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 # We need this for later, so we know how long to sleep.
 try_command_on_node 0 $CTDB getvar MonitorInterval
 monitor_interval="${out#*= }"
index 711ecfb4157b448ad96dc5400830324838703ff6..539d25ece89fa5f5b898fdb079ea194d14608cc1 100755 (executable)
@@ -1,47 +1,38 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that it is possible to ping a public address after disabling a node.
+# Verify that it is possible to ping a public address after disabling a node.
 
-We ping a public IP, disable the node hosting it and then ping the
-public IP again.
+We ping a public IP, disable the node hosting it and then ping the
+public IP again.
 
-Prerequisites:
+Prerequisites:
 
-* An active CTDB cluster with at least 2 nodes with public addresses.
+* An active CTDB cluster with at least 2 nodes with public addresses.
 
-* Test must be run on a real or virtual cluster rather than against
-  local daemons.
+* Test must be run on a real or virtual cluster rather than against
+  local daemons.
 
-* Test must not be run from a cluster node.
+* Test must not be run from a cluster node.
 
-Steps:
+Steps:
 
-1. Verify that the cluster is healthy.
-2. Select a public address and its corresponding node.
-3. Send a single ping request packet to the selected public address.
-4. Disable the selected node.
-5. Send another single ping request packet to the selected public address.
+1. Verify that the cluster is healthy.
+2. Select a public address and its corresponding node.
+3. Send a single ping request packet to the selected public address.
+4. Disable the selected node.
+5. Send another single ping request packet to the selected public address.
 
-Expected results:
+Expected results:
 
-* When a node is disabled the public address fails over and the
-  address is still pingable.
-EOF
-}
+# * When a node is disabled the public address fails over and the
+#   address is still pingable.
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 select_test_node_and_ips
 
 echo "Removing ${test_ip} from the local neighbor table..."
index 82490e769b8eeb2d725f48249f71c8db45f43e0f..233819b011d8c1c95a45652a554614a59d25ed3f 100755 (executable)
@@ -1,47 +1,38 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that it is possible to SSH to a public address after disabling a node.
+# Verify that it is possible to SSH to a public address after disabling a node.
 
-We SSH to a public IP and check the hostname, disable the node hosting
-it and then SSH again to confirm that the hostname has changed.
+We SSH to a public IP and check the hostname, disable the node hosting
+it and then SSH again to confirm that the hostname has changed.
 
-Prerequisites:
+Prerequisites:
 
-* An active CTDB cluster with at least 2 nodes with public addresses.
+* An active CTDB cluster with at least 2 nodes with public addresses.
 
-* Test must be run on a real or virtual cluster rather than against
-  local daemons.
+* Test must be run on a real or virtual cluster rather than against
+  local daemons.
 
-* Test must not be run from a cluster node.
+* Test must not be run from a cluster node.
 
-Steps:
+Steps:
 
-1. Verify that the cluster is healthy.
-2. Select a public address and its corresponding node.
-3. SSH to the selected public address and run hostname.
-4. Disable the selected node.
-5. SSH to the selected public address again and run hostname.
+1. Verify that the cluster is healthy.
+2. Select a public address and its corresponding node.
+3. SSH to the selected public address and run hostname.
+4. Disable the selected node.
+5. SSH to the selected public address again and run hostname.
 
-Expected results:
+Expected results:
 
-* When a node is disabled the public address fails over and it is
-  still possible to SSH to the node.  The hostname should change.
-EOF
-}
+# * When a node is disabled the public address fails over and it is
+#   still possible to SSH to the node.  The hostname should change.
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 select_test_node_and_ips
 
 echo "Removing ${test_ip} from the local neighbor table..."
index 45091c99dc863c9ac580326ee5f600ac065cf422..ac2cafdf2606a21609e4e8b698ded0429078bf64 100755 (executable)
@@ -1,51 +1,42 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that a mounted NFS share is still operational after failover.
+# Verify that a mounted NFS share is still operational after failover.
 
-We mount an NFS share from a node, write a file via NFS and then
-confirm that we can correctly read the file after a failover.
+We mount an NFS share from a node, write a file via NFS and then
+confirm that we can correctly read the file after a failover.
 
-Prerequisites:
+Prerequisites:
 
-* An active CTDB cluster with at least 2 nodes with public addresses.
+* An active CTDB cluster with at least 2 nodes with public addresses.
 
-* Test must be run on a real or virtual cluster rather than against
-  local daemons.
+* Test must be run on a real or virtual cluster rather than against
+  local daemons.
 
-* Test must not be run from a cluster node.
+* Test must not be run from a cluster node.
 
-Steps:
+Steps:
 
-1. Verify that the cluster is healthy.
-2. Select a public address and its corresponding node.
-3. Select the 1st NFS share exported on the node.
-4. Mount the selected NFS share.
-5. Create a file in the NFS mount and calculate its checksum.
-6. Disable the selected node.
-7. Read the file and calculate its checksum.
-8. Compare the checksums.
+1. Verify that the cluster is healthy.
+2. Select a public address and its corresponding node.
+3. Select the 1st NFS share exported on the node.
+4. Mount the selected NFS share.
+5. Create a file in the NFS mount and calculate its checksum.
+6. Disable the selected node.
+7. Read the file and calculate its checksum.
+8. Compare the checksums.
 
-Expected results:
+Expected results:
 
-* When a node is disabled the public address fails over and it is
-  possible to correctly read a file over NFS.  The checksums should be
-  the same before and after.
-EOF
-}
+# * When a node is disabled the public address fails over and it is
+#   possible to correctly read a file over NFS.  The checksums should be
+#   the same before and after.
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 nfs_test_setup
 
 echo "Create file containing random data..."
index 7da6289461ab7a96a29c73fedfbe2dd5d0a9e02b..5c8324cdab40a6de3c2653a5a4f0c0c8c263c14a 100755 (executable)
@@ -1,53 +1,44 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that a file created on a node is readable via NFS after a failover.
+# Verify that a file created on a node is readable via NFS after a failover.
 
-We write a file into an exported directory on a node, mount the NFS
-share from a node, verify that we can read the file via NFS and that
-we can still read it after a failover.
+We write a file into an exported directory on a node, mount the NFS
+share from a node, verify that we can read the file via NFS and that
+we can still read it after a failover.
 
-Prerequisites:
+Prerequisites:
 
-* An active CTDB cluster with at least 2 nodes with public addresses.
+* An active CTDB cluster with at least 2 nodes with public addresses.
 
-* Test must be run on a real or virtual cluster rather than against
-  local daemons.
+* Test must be run on a real or virtual cluster rather than against
+  local daemons.
 
-* Test must not be run from a cluster node.
+* Test must not be run from a cluster node.
 
-Steps:
+Steps:
 
-1.  Verify that the cluster is healthy.
-2.  Select a public address and its corresponding node.
-3.  Select the 1st NFS share exported on the node.
-4.  Write a file into exported directory on the node and calculate its
-    checksum.
-5.  Mount the selected NFS share.
-6.  Read the file via the NFS mount and calculate its checksum.
-7.  Compare checksums.
-8.  Disable the selected node.
-9.  Read the file via NFS and calculate its checksum.
-10. Compare the checksums.
+1.  Verify that the cluster is healthy.
+2.  Select a public address and its corresponding node.
+3.  Select the 1st NFS share exported on the node.
+4.  Write a file into exported directory on the node and calculate its
+    checksum.
+5.  Mount the selected NFS share.
+6.  Read the file via the NFS mount and calculate its checksum.
+7.  Compare checksums.
+8.  Disable the selected node.
+9.  Read the file via NFS and calculate its checksum.
+10. Compare the checksums.
 
-Expected results:
+Expected results:
 
-* Checksums for the file on all 3 occasions should be the same.
-EOF
-}
+# * Checksums for the file on all 3 occasions should be the same.
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 nfs_test_setup
 
 echo "Create file containing random data..."
index fc1e7a730b43739f24fad5e10dbf543d3f56d346..2d157483320fba79d9ccae4672b952034994afc3 100755 (executable)
@@ -1,51 +1,42 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that a mounted NFS share is still operational after failover.
+# Verify that a mounted NFS share is still operational after failover.
 
-We mount an NFS share from a node, write a file via NFS and then
-confirm that we can correctly read the file after a failover.
+We mount an NFS share from a node, write a file via NFS and then
+confirm that we can correctly read the file after a failover.
 
-Prerequisites:
+Prerequisites:
 
-* An active CTDB cluster with at least 2 nodes with public addresses.
+* An active CTDB cluster with at least 2 nodes with public addresses.
 
-* Test must be run on a real or virtual cluster rather than against
-  local daemons.
+* Test must be run on a real or virtual cluster rather than against
+  local daemons.
 
-* Test must not be run from a cluster node.
+* Test must not be run from a cluster node.
 
-Steps:
+Steps:
 
-1. Verify that the cluster is healthy.
-2. Select a public address and its corresponding node.
-3. Select the 1st NFS share exported on the node.
-4. Mount the selected NFS share.
-5. Create a file in the NFS mount and calculate its checksum.
-6. Kill CTDB on the selected node.
-7. Read the file and calculate its checksum.
-8. Compare the checksums.
+1. Verify that the cluster is healthy.
+2. Select a public address and its corresponding node.
+3. Select the 1st NFS share exported on the node.
+4. Mount the selected NFS share.
+5. Create a file in the NFS mount and calculate its checksum.
+6. Kill CTDB on the selected node.
+7. Read the file and calculate its checksum.
+8. Compare the checksums.
 
-Expected results:
+Expected results:
 
-* When a node is disabled the public address fails over and it is
-  possible to correctly read a file over NFS.  The checksums should be
-  the same before and after.
-EOF
-}
+# * When a node is disabled the public address fails over and it is
+#   possible to correctly read a file over NFS.  The checksums should be
+#   the same before and after.
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 nfs_test_setup
 
 echo "Create file containing random data..."
index 88e4e554c34abcba1b2284c608cf0b5af1306c41..d168cf22216b4e07ec3871d3ad707683aaff6a1b 100755 (executable)
@@ -1,21 +1,14 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that the recovery daemon correctly handles a rogue IP
+# Verify that the recovery daemon correctly handles a rogue IP
 
-It should be released...
-EOF
-}
+# It should be released...
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
-
-ctdb_test_init
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
-cluster_is_healthy
+ctdb_test_init
 
 select_test_node_and_ips
 
index 2c5f7c5c999f98261266d1dcead3bc17ca45cfec..d4fee69c96d2836afb93adca8b8e50357e4c7868 100755 (executable)
@@ -1,21 +1,14 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that TAKE_IP will work for an IP that is already on an interface
+# Verify that TAKE_IP will work for an IP that is already on an interface
 
-This is a variation of simple/60_recoverd_missing_ip.sh
-EOF
-}
+# This is a variation of simple/60_recoverd_missing_ip.sh
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
-
-ctdb_test_init
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
-cluster_is_healthy
+ctdb_test_init
 
 select_test_node_and_ips