From: Martin Schwenke Date: Tue, 6 Mar 2018 01:32:30 +0000 (+1100) Subject: ctdb-tests: Use CTDB_BASE instead of node_dir X-Git-Tag: talloc-2.1.12~98 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ebd25890872402bce533469428aa65e08487352c;p=thirdparty%2Fsamba.git ctdb-tests: Use CTDB_BASE instead of node_dir Simple test configuration is all relative to CTDB_BASE and node_dir is redundant. Make this explicit by dropping most uses of node_dir. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/simple/scripts/local_daemons.bash b/ctdb/tests/simple/scripts/local_daemons.bash index 1858492bcd5..4b215f939a6 100644 --- a/ctdb/tests/simple/scripts/local_daemons.bash +++ b/ctdb/tests/simple/scripts/local_daemons.bash @@ -145,18 +145,12 @@ setup_ctdb () local pnn for pnn in $(seq 0 $(($TEST_LOCAL_DAEMONS - 1))) ; do - local node_dir=$(node_dir "$pnn") - setup_ctdb_base "$SIMPLE_TESTS_VAR_DIR" "node.${pnn}" \ functions - if [ "$node_dir" != "$CTDB_BASE" ] ; then - die "Inconsistent CTDB_BASE" - fi - cp "$nodes_file" "${CTDB_BASE}/nodes" - local public_addresses="${node_dir}/public_addresses" + local public_addresses="${CTDB_BASE}/public_addresses" if $no_public_addresses || [ $pnn_no_ips -eq $pnn ] ; then echo "Node ${pnn} will have no public IPs." @@ -167,19 +161,17 @@ setup_ctdb () local node_ip=$(sed -n -e "$(($pnn + 1))p" "$nodes_file") - local conf=$(node_conf "$pnn") - - local db_dir="${node_dir}/db" + local db_dir="${CTDB_BASE}/db" mkdir -p "${db_dir}/persistent" if $no_event_scripts ; then rm -vf "${CTDB_BASE}/events.d/"* fi - cat >"$conf" <"${CTDB_BASE}/ctdbd.conf" <