mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
tests/eventscripts - Restructure according to new convention
Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit eb13507713ba6732271b7c3024bfddbda6da5ffc)
This commit is contained in:
parent
a35eca8bda
commit
df39a671db
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "no public addresses"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "all interfaces up"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "no public addresses"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "all interfaces up"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "1 interface down"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "all interfaces up, 1 is a bond"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "1 bond, no active slaves"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "1 bond, active slaves, link down"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "unknown interface, up"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "unknown interface, down, up"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "CTDB_PARTIALLY_ONLINE_INTERFACES, 1 down"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "CTDB_PARTIALLY_ONLINE_INTERFACES, all down"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "CTDB_PARTIALLY_ONLINE_INTERFACES, 1 bond down"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "CTDB_PARTIALLY_ONLINE_INTERFACES, 1 bond down"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "1 bond, active slaves, link down"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "spurious addresses on interface, no action"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "spurious addresses on interface, delete them"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "takeip, removeip"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "error - no args given"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "error - remove a non-existent ip"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "no public addresses"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "all interfaces up"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "error - no args given"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "add an ip"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "error - add same IP twice"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "not configured"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "missing config, no takeip, ipreallocated"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "empty config, ipreallocated"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "empty config, takeip"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "1 IP configured, takeip"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "1 IP configured, takeip, releaseip"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "1 IP configured, ipreallocated"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "1 IP configured, takeip twice"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "All IPs configured, takeip"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "All IPs configured, takeip all on node"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "__auto_link_local__, takeip all on node"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "1 IP configured, takeip, releaseip, ipreallocated"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "not managed, check no-op"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "not managed, check no-op"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "not managed, check no-op"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "auto-start, simple"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "auto-stop, simple"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "all OK"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "winbind down"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "port 445 down"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "port 139 down"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "non-existent share path"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "non-existent share - not checked"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "port 139 down, default tcp checker, debug"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "port 139 down, ctdb checktcpport not implemented"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "port 139 down, ctdb checktcpport not implemented, debug"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "port 139 down, ctdb checktcpport/nmap not implemented, debug"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "port 139 down, ctdb checktcpport/nmap/netstat not implemented"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "not managed, check no-op"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "get RPC service fail limits/actions"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "all services available"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "knfsd down, 1 iteration"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "knfsd down, 6 iterations"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "lockd down, 15 iterations"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "lockd down, 15 iterations, back up after 10"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "rquotad down, 5 iterations"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "rquotad down, 5 iterations, back up after 1"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "statd down, 6 iterations"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "statd down, 8 iterations, back up after 2"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "mountd down, 1 iteration"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "mountd down, 10 iterations"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "mountd down, 10 iterations, back up after 5"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "2nd share missing"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "2nd share missing, skipping share checks"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "takeip, ipreallocated -> reconfigure"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "takeip, monitor -> reconfigure"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "takeip, monitor -> reconfigure, replay error"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "takeip, monitor -> reconfigure, replay timedout"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "takeip, monitor -> reconfigure, replay disabled"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "reconfigure (synthetic), twice"
|
||||
# This checks that the lock is released...
|
@ -1,8 +1,5 @@
|
||||
# Hey Emacs, this is a -*- shell-script -*- !!! :-)
|
||||
|
||||
# Print a message and exit.
|
||||
die () { echo "$@" >&2 ; exit 1 ; }
|
||||
|
||||
# Augment PATH with relevant stubs/ directories. We do this by actually
|
||||
# setting PATH, and also by setting $EVENTSCRIPTS_PATH and then
|
||||
# prepending that to $PATH in rc.local to avoid the PATH reset in
|
||||
@ -10,45 +7,29 @@ die () { echo "$@" >&2 ; exit 1 ; }
|
||||
|
||||
EVENTSCRIPTS_PATH=""
|
||||
|
||||
if [ -d "${EVENTSCRIPTS_TESTS_DIR}/stubs" ] ; then
|
||||
EVENTSCRIPTS_PATH="${EVENTSCRIPTS_TESTS_DIR}/stubs"
|
||||
fi
|
||||
|
||||
export EVENTSCRIPTS_TESTCASE_DIR=$(dirname "$0")
|
||||
if [ $(basename "$EVENTSCRIPTS_TESTCASE_DIR") = "eventscripts" ] ; then
|
||||
# Just a test script, no testcase subdirectory.
|
||||
EVENTSCRIPTS_TESTCASE_DIR="$EVENTSCRIPTS_TESTS_DIR"
|
||||
else
|
||||
if [ -d "${EVENTSCRIPTS_TESTCASE_DIR}/stubs" ] ; then
|
||||
EVENTSCRIPTS_PATH="${EVENTSCRIPTS_TESTCASE_DIR}/stubs:${EVENTSCRIPTS_PATH}"
|
||||
fi
|
||||
if [ -d "${TEST_SUBDIR}/stubs" ] ; then
|
||||
EVENTSCRIPTS_PATH="${TEST_SUBDIR}/stubs"
|
||||
fi
|
||||
|
||||
export EVENTSCRIPTS_PATH
|
||||
|
||||
PATH="${EVENTSCRIPTS_PATH}:${PATH}"
|
||||
|
||||
if [ -d "${EVENTSCRIPTS_TESTCASE_DIR}/etc" ] ; then
|
||||
CTDB_ETCDIR="${EVENTSCRIPTS_TESTCASE_DIR}/etc"
|
||||
elif [ -d "${EVENTSCRIPTS_TESTS_DIR}/etc" ] ; then
|
||||
CTDB_ETCDIR="${EVENTSCRIPTS_TESTS_DIR}/etc"
|
||||
if [ -d "${TEST_SUBDIR}/etc" ] ; then
|
||||
CTDB_ETCDIR="${TEST_SUBDIR}/etc"
|
||||
else
|
||||
die "Unable to set \$CTDB_ETCDIR"
|
||||
fi
|
||||
export CTDB_ETCDIR
|
||||
|
||||
if [ -d "${EVENTSCRIPTS_TESTCASE_DIR}/etc-ctdb" ] ; then
|
||||
CTDB_BASE="${EVENTSCRIPTS_TESTCASE_DIR}/etc-ctdb"
|
||||
elif [ -d "${EVENTSCRIPTS_TESTCASE_DIR}/etc/ctdb" ] ; then
|
||||
CTDB_BASE="${EVENTSCRIPTS_TESTCASE_DIR}/etc/ctdb"
|
||||
elif [ -d "${EVENTSCRIPTS_TESTS_DIR}/etc-ctdb" ] ; then
|
||||
CTDB_BASE="${EVENTSCRIPTS_TESTS_DIR}/etc-ctdb"
|
||||
if [ -d "${TEST_SUBDIR}/etc-ctdb" ] ; then
|
||||
CTDB_BASE="${TEST_SUBDIR}/etc-ctdb"
|
||||
else
|
||||
die "Unable to set \$CTDB_BASE"
|
||||
fi
|
||||
export CTDB_BASE
|
||||
|
||||
export EVENTSCRIPTS_TESTS_VAR_DIR="${EVENTSCRIPTS_TESTS_DIR}/var"
|
||||
export EVENTSCRIPTS_TESTS_VAR_DIR="${TEST_SUBDIR}/var"
|
||||
if [ "$EVENTSCRIPTS_TESTS_VAR_DIR" != "/var" ] ; then
|
||||
rm -r "$EVENTSCRIPTS_TESTS_VAR_DIR"
|
||||
fi
|
||||
@ -57,7 +38,7 @@ export CTDB_VARDIR="$EVENTSCRIPTS_TESTS_VAR_DIR/ctdb"
|
||||
|
||||
######################################################################
|
||||
|
||||
if [ "$EVENTSCRIPT_TESTS_VERBOSE" = "yes" ] ; then
|
||||
if [ "$TEST_VERBOSE" = "yes" ] ; then
|
||||
debug () { echo "$@" ; }
|
||||
else
|
||||
debug () { : ; }
|
||||
@ -665,12 +646,7 @@ define_test ()
|
||||
{
|
||||
desc="$1"
|
||||
|
||||
_f="$0"
|
||||
_f="${_f#./}" # strip leading ./
|
||||
_f="${_f#simple/}" # strip leading simple/
|
||||
_f="${_f#multievent/}" # strip leading multievent/
|
||||
_f="${_f%%/*}" # if subdir, strip off file
|
||||
_f="${_f%.sh}" # strip off .sh suffix if any
|
||||
_f=$(basename "$0" ".sh")
|
||||
|
||||
# Remaining format should be NN.service.event.NNN or NN.service.NNN:
|
||||
_num="${_f##*.}"
|
||||
@ -779,7 +755,7 @@ result_footer ()
|
||||
{
|
||||
_passed="$1"
|
||||
|
||||
if [ "$EVENTSCRIPT_TESTS_VERBOSE" = "yes" ] || ! $_passed ; then
|
||||
if [ "$TEST_VERBOSE" = "yes" ] || ! $_passed ; then
|
||||
|
||||
cat <<EOF
|
||||
--------------------------------------------------
|
@ -126,7 +126,7 @@ ip_reallocate ()
|
||||
fi
|
||||
_flags="${_flags}${_flags:+,}${_this}"
|
||||
done
|
||||
"$(dirname ${EVENTSCRIPTS_TESTS_DIR})/bin/ctdb_takeover_tests" \
|
||||
"$(dirname ${TEST_SUBDIR})/bin/ctdb_takeover_tests" \
|
||||
"ctdb_takeover_run_core" "$_flags" <"$FAKE_CTDB_IP_LAYOUT" |
|
||||
sort >"$_t"
|
||||
mv "$_t" "$FAKE_CTDB_IP_LAYOUT"
|
||||
|
Loading…
x
Reference in New Issue
Block a user