From: Martin Schwenke Date: Mon, 12 Feb 2018 00:42:04 +0000 (+1100) Subject: ctdb-tests: 11.natgw event script setup modularisation X-Git-Tag: talloc-2.1.13~159 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a63c45608053d1f461f83f21cb2ca3471847d987;p=thirdparty%2Fsamba.git ctdb-tests: 11.natgw event script setup modularisation Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/eventscripts/11.natgw.001.sh b/ctdb/tests/eventscripts/11.natgw.001.sh index afcc0972ddf..06b2cd39cee 100755 --- a/ctdb/tests/eventscripts/11.natgw.001.sh +++ b/ctdb/tests/eventscripts/11.natgw.001.sh @@ -4,7 +4,7 @@ define_test "not configured" -setup_ctdb +setup ok_null simple_test_event "ipreallocate" diff --git a/ctdb/tests/eventscripts/11.natgw.002.sh b/ctdb/tests/eventscripts/11.natgw.002.sh index c9054068df4..5e3f2d3a224 100755 --- a/ctdb/tests/eventscripts/11.natgw.002.sh +++ b/ctdb/tests/eventscripts/11.natgw.002.sh @@ -4,7 +4,8 @@ define_test "missing config file" -setup_ctdb +setup + setup_ctdb_natgw <"$CTDB_NATGW_NODES" + done >"$natgw_nodes" # Assume all of the nodes are on a /24 network and have IPv4 # addresses: - read _ip <"$CTDB_NATGW_NODES" - export CTDB_NATGW_PRIVATE_NETWORK="${_ip%.*}.0/24" + read _ip <"$natgw_nodes" + CTDB_NATGW_NODES="$natgw_nodes" + CTDB_NATGW_PRIVATE_NETWORK="${_ip%.*}.0/24" # These are fixed. Probably don't use the same network for the # private node IPs. To unset the default gateway just set it to # "". :-) - export CTDB_NATGW_PUBLIC_IP="10.1.1.121/24" - export CTDB_NATGW_PUBLIC_IFACE="eth1" - export CTDB_NATGW_DEFAULT_GATEWAY="10.1.1.254" - export CTDB_NATGW_SLAVE_ONLY="" + CTDB_NATGW_PUBLIC_IP="10.1.1.121/24" + CTDB_NATGW_PUBLIC_IFACE="eth1" + CTDB_NATGW_DEFAULT_GATEWAY="10.1.1.254" } ok_natgw_master_ip_addr_show ()