mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
ctdb-tests: CTDB_DBDIR_PERSISTENT should not depend on CTDB_DBDIR
Add new variable CTDB_DBDIR_BASE, just for event script unit tests. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
051203e1f8
commit
8ea7fa57f4
@ -8,6 +8,6 @@ setup
|
||||
|
||||
set_fs_usage 100
|
||||
ok <<EOF
|
||||
WARNING: Filesystem ${CTDB_DBDIR} utilization 100% >= threshold 90%
|
||||
WARNING: Filesystem ${CTDB_DBDIR_BASE} utilization 100% >= threshold 90%
|
||||
EOF
|
||||
simple_test
|
||||
|
@ -85,9 +85,11 @@ setup_script_options ()
|
||||
|
||||
setup_dbdir ()
|
||||
{
|
||||
export CTDB_DBDIR="${EVENTSCRIPTS_TESTS_VAR_DIR}/db"
|
||||
export CTDB_DBDIR_PERSISTENT="${CTDB_DBDIR}/persistent"
|
||||
export CTDB_DBDIR_STATE="${CTDB_DBDIR}/state"
|
||||
export CTDB_DBDIR_BASE="${EVENTSCRIPTS_TESTS_VAR_DIR}/db"
|
||||
export CTDB_DBDIR="$CTDB_DBDIR_BASE"
|
||||
export CTDB_DBDIR_PERSISTENT="${CTDB_DBDIR_BASE}/persistent"
|
||||
export CTDB_DBDIR_STATE="${CTDB_DBDIR_BASE}/state"
|
||||
mkdir -p "$CTDB_DBDIR"
|
||||
mkdir -p "$CTDB_DBDIR_PERSISTENT"
|
||||
mkdir -p "$CTDB_DBDIR_STATE"
|
||||
}
|
||||
|
@ -16,10 +16,11 @@ esac
|
||||
|
||||
fs="${1:-/}"
|
||||
|
||||
# Anything starting with CTDB_DBDIR gets canonicalised to CTDB_DBDIR.
|
||||
# This helps with the setting of defaults for the filesystem checks.
|
||||
if [ "${fs#${CTDB_DBDIR}}" != "$fs" ] ; then
|
||||
fs="$CTDB_DBDIR"
|
||||
# Anything starting with CTDB_DBDIR_BASE gets canonicalised to
|
||||
# CTDB_DBDIR_BASE. This helps with the setting of defaults for the
|
||||
# filesystem checks.
|
||||
if [ "${fs#${CTDB_DBDIR_BASE}}" != "$fs" ] ; then
|
||||
fs="$CTDB_DBDIR_BASE"
|
||||
fi
|
||||
|
||||
# A default, for tests that don't initialise this...
|
||||
|
Loading…
Reference in New Issue
Block a user