Skip to content

Commit

Permalink
ctdb-tests: Depend on setup_ctdb_base() to install events.d/
Browse files Browse the repository at this point in the history
This directory is only used by simple tests when running against local
daemons.  Moving it to simple/etc-ctdb/events.d/ means that it is
automatically copied by setup_ctdb_base().

Signed-off-by: Martin Schwenke <[email protected]>
Reviewed-by: Amitay Isaacs <[email protected]>
  • Loading branch information
martin-schwenke authored and Martin Schwenke committed Mar 9, 2018
1 parent 8559848 commit 98bd5b6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
File renamed without changes.
11 changes: 0 additions & 11 deletions ctdb/tests/simple/scripts/local_daemons.bash
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,6 @@ setup_public_addresses ()

setup_ctdb ()
{
# When running certain tests we add and remove eventscripts, so we
# need to be able to modify the events.d/ directory. Therefore,
# we use a temporary events.d/ directory under $TEST_VAR_DIR. We
# copy the actual test eventscript(s) in there from the original
# events.d/ directory that sits alongside $TEST_SCRIPT_DIR.
local top=$(dirname "$TEST_SCRIPTS_DIR")
local events_d="${top}/events.d"
mkdir -p "${TEST_VAR_DIR}/events.d"
cp -p "${events_d}/"* "${TEST_VAR_DIR}/events.d/"

setup_nodes >"$CTDB_NODES" || return 1

# If there are (strictly) greater than 2 nodes then we'll
Expand Down Expand Up @@ -188,7 +178,6 @@ setup_ctdb ()
CTDB_RECOVERY_LOCK="${SIMPLE_TESTS_VAR_DIR}/rec.lock"
CTDB_NODES="$CTDB_NODES"
CTDB_NODE_ADDRESS="${node_ip}"
CTDB_EVENT_SCRIPT_DIR="${TEST_VAR_DIR}/events.d"
CTDB_LOGGING="file:${node_dir}/log.ctdb"
CTDB_DEBUGLEVEL=INFO
CTDB_DBDIR="${db_dir}"
Expand Down
1 change: 0 additions & 1 deletion ctdb/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,6 @@ def build(bld):
'complex',
'cunit',
'eventd',
'events.d',
'eventscripts',
'onnode',
'shellcheck',
Expand Down

0 comments on commit 98bd5b6

Please sign in to comment.