ctdb-tests: Simplify nodes file handling in tool tests
authorMartin Schwenke <martin@meltin.net>
Wed, 14 Mar 2018 04:10:45 +0000 (15:10 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 19 Mar 2018 01:23:20 +0000 (02:23 +0100)
commit480c586c7dbc5ffef832c6a0be2c4e6b70f98514
treea1799e07557331567da5fb504f6186754ef43a8f
parent3a7c49dfbc9ce579876d5cd680ede1f30c11c950
ctdb-tests: Simplify nodes file handling in tool tests

Instead of using an intermediate environment variable for nodes files,
just create "node" or "nodes.<pnn>" in CTDB_BASE.  This makes the
nodes file loading in fake_ctdb slightly repetitive but simplifies the
test scripts a lot.  It also remove several instance of the CTDB_NODES
variable from the code base, so it is no longer found by "git grep".

Use an empty nodes file to indicate that fake_ctdbd should fail to
read it.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/src/fake_ctdbd.c
ctdb/tests/tool/ctdb.listnodes.001.sh
ctdb/tests/tool/ctdb.reloadnodes.003.sh
ctdb/tests/tool/scripts/local.sh