From: Martin Schwenke Date: Wed, 22 Jul 2020 04:43:24 +0000 (+1000) Subject: Revert "ctdb-tests: Update preamble for INTEGRATION tests" X-Git-Tag: talloc-2.3.2~1028 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4438e44f880249164bb33d783f9a773f44ba1a99;p=thirdparty%2Fsamba.git Revert "ctdb-tests: Update preamble for INTEGRATION tests" Fix missing Reviewed-by: tag. This reverts commit 65f56505e29c01d5891e5bc1050b6c37b8cbdee7. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/INTEGRATION/database/basics.001.attach.sh b/ctdb/tests/INTEGRATION/database/basics.001.attach.sh index e5c6b81ba65..bcec20afc5e 100755 --- a/ctdb/tests/INTEGRATION/database/basics.001.attach.sh +++ b/ctdb/tests/INTEGRATION/database/basics.001.attach.sh @@ -1,12 +1,35 @@ -#!/usr/bin/env bash +#!/bin/bash -# Verify that 'ctdb getdbmap' operates as expected +test_info() +{ + cat </dev/null 2>&1" } +. "${TEST_SCRIPTS_DIR}/integration.bash" + +ctdb_test_init + +set -e + +cluster_is_healthy + TESTDB="persistent_trans.tdb" try_command_on_node 0 "$CTDB attach $TESTDB persistent" diff --git a/ctdb/tests/INTEGRATION/database/transaction.004.update_record.sh b/ctdb/tests/INTEGRATION/database/transaction.004.update_record.sh index 528303a6435..90b5ee06151 100755 --- a/ctdb/tests/INTEGRATION/database/transaction.004.update_record.sh +++ b/ctdb/tests/INTEGRATION/database/transaction.004.update_record.sh @@ -1,21 +1,38 @@ -#!/usr/bin/env bash - -# Verify that "ctdb update_record_persistent" creates new records and -# updates existing records in a persistent database -# -# 1. Create and wipe a persistent test database -# 2. Do a recovery -# 3. Confirm that the database is empty -# 4. Create a new record using "ctdb update_record_persistent" -# 5. Confirm the record exists in the database using "ctdb cattdb" -# 6. Update the record's value using "ctdb update_record_persistent" -# 7. Confirm that the original value no longer exists using "ctdb cattdb" +#!/bin/bash + +test_info() +{ + cat </dev/null 2>&1" } +. "${TEST_SCRIPTS_DIR}/integration.bash" + +ctdb_test_init + +set -e + +cluster_is_healthy + TESTDB="replicated_trans.tdb" try_command_on_node 0 "$CTDB attach $TESTDB replicated" diff --git a/ctdb/tests/INTEGRATION/database/traverse.001.one.sh b/ctdb/tests/INTEGRATION/database/traverse.001.one.sh index 1b3b7c2d25c..7f3007d5105 100755 --- a/ctdb/tests/INTEGRATION/database/traverse.001.one.sh +++ b/ctdb/tests/INTEGRATION/database/traverse.001.one.sh @@ -1,17 +1,29 @@ -#!/usr/bin/env bash +#!/bin/bash -# Confirm that traverses of volatile databases work as expected +test_info() +{ + cat <' 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 <' 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 <' 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 <' on the node and verify that the + correct output is shown. +4. Run 'ctdb process-exists ' 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 <'. +3. Verify that the status of the node changes to 'DISCONNECTED'. +4. Now run 'ctdb ip -n ' 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 <'. + +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 <