ctdb-tests: Factor out reading of known public IP addresses
authorMartin Schwenke <martin@meltin.net>
Sat, 3 Dec 2016 05:20:01 +0000 (16:20 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 19 Dec 2016 03:07:07 +0000 (04:07 +0100)
commit16abc2071bea87eabb743d52ec273aa976da1f00
tree5adcba45c29aa8dc274de1fc4ad3b5d06361db8b
parent465323d14f553092f598cc49cdca7991980725de
ctdb-tests: Factor out reading of known public IP addresses

One change in behaviour is to actually copy the known IPs per node
instead of just assigning the pointer.  When this is used by
fake_ctdbd the resulting structure will be used to keep state for
individual nodes, so data for nodes needs to be independent.

Also, drop some asserts in the factored code and do (slightly) better
error handling.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/src/ctdb_takeover_tests.c
ctdb/tests/src/ipalloc_read_known_ips.c [new file with mode: 0644]
ctdb/tests/src/ipalloc_read_known_ips.h [new file with mode: 0644]
ctdb/wscript