Skip to content

Commit

Permalink
ctdb-tests: Allow tests access to CTDB_BASE
Browse files Browse the repository at this point in the history
On the node where the tests are run, CTDB_BASE is always set.  This
applies to local daemons too.  However, when tests are being run
against a real cluster, there may be a need to access configuration
files.  However, CTDB_BASE will not be set in this case.

So, provide a function to get CTDB_BASE, if set, or a real cluster
node's configuration directory, if CTDB_BASE is not set.

Signed-off-by: Martin Schwenke <[email protected]>
Reviewed-by: Amitay Isaacs <[email protected]>
  • Loading branch information
martin-schwenke authored and Amitay Isaacs committed Mar 19, 2018
1 parent a757182 commit b6127a6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ctdb/tests/scripts/integration.bash
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,11 @@ get_ctdbd_command_line_option ()
echo "${t%% -*}"
}

ctdb_base_show ()
{
echo "${CTDB_BASE:-${CTDB_SCRIPTS_BASE}}"
}

#######################################

wait_for_monitor_event ()
Expand Down

0 comments on commit b6127a6

Please sign in to comment.