diff options
author | Martin Schwenke <martin@meltin.net> | 2018-02-12 11:34:57 +1100 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2018-03-01 19:39:14 +0100 |
commit | bb03532cdd5df62cd70d4e8402745f1dbfbfeaaa (patch) | |
tree | 5e5e8585ef20154ff1e567f8b69c42c737515bbe /ctdb | |
parent | 1c2361a5f736bb14fa809a7071b1ebf08f560f8d (diff) | |
download | samba-bb03532cdd5df62cd70d4e8402745f1dbfbfeaaa.tar.gz |
ctdb-tests: Use consistent NAT gateway nodes file
Using a different file each time causes the event script to believe
that the configuration has changed even though only the node states
have changed. Change this to stop the tests from doing something
unexpected.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rwxr-xr-x | ctdb/tests/eventscripts/11.natgw.015.sh | 5 | ||||
-rwxr-xr-x | ctdb/tests/eventscripts/11.natgw.025.sh | 4 | ||||
-rw-r--r-- | ctdb/tests/eventscripts/scripts/local.sh | 4 |
3 files changed, 5 insertions, 8 deletions
diff --git a/ctdb/tests/eventscripts/11.natgw.015.sh b/ctdb/tests/eventscripts/11.natgw.015.sh index c7e0c15262f..691b363ef1b 100755 --- a/ctdb/tests/eventscripts/11.natgw.015.sh +++ b/ctdb/tests/eventscripts/11.natgw.015.sh @@ -33,7 +33,7 @@ setup_ctdb_natgw <<EOF 192.168.1.24 EOF -ok "NAT gateway configuration has changed" +ok_null simple_test_event "ipreallocated" ok "default via ${FAKE_CTDB_NATGW_MASTER} dev ethXXX metric 10 " @@ -51,7 +51,7 @@ setup_ctdb_natgw <<EOF 192.168.1.24 EOF -ok "NAT gateway configuration has changed" +ok_null simple_test_event "ipreallocated" ok "default via ${CTDB_NATGW_DEFAULT_GATEWAY} dev ethXXX metric 10 " @@ -59,4 +59,3 @@ simple_test_command ip route show ok_natgw_master_ip_addr_show simple_test_command ip addr show "$CTDB_NATGW_PUBLIC_IFACE" - diff --git a/ctdb/tests/eventscripts/11.natgw.025.sh b/ctdb/tests/eventscripts/11.natgw.025.sh index 456fc3c030f..60602d3ead9 100755 --- a/ctdb/tests/eventscripts/11.natgw.025.sh +++ b/ctdb/tests/eventscripts/11.natgw.025.sh @@ -35,7 +35,7 @@ setup_ctdb_natgw <<EOF 192.168.1.24 EOF -ok "NAT gateway configuration has changed" +ok_null simple_test_event "ipreallocated" ok_natgw_slave_static_routes @@ -53,7 +53,7 @@ setup_ctdb_natgw <<EOF 192.168.1.24 EOF -ok "NAT gateway configuration has changed" +ok_null simple_test_event "ipreallocated" ok_natgw_master_static_routes diff --git a/ctdb/tests/eventscripts/scripts/local.sh b/ctdb/tests/eventscripts/scripts/local.sh index 65676e08b21..adaad08a9b1 100644 --- a/ctdb/tests/eventscripts/scripts/local.sh +++ b/ctdb/tests/eventscripts/scripts/local.sh @@ -728,9 +728,7 @@ setup_ctdb_natgw () natgw_config_dir="${TEST_VAR_DIR}/natgw_config" mkdir -p "$natgw_config_dir" - # These will accumulate, 1 per test... but will be cleaned up at - # the end. - export CTDB_NATGW_NODES=$(mktemp --tmpdir="$natgw_config_dir") + export CTDB_NATGW_NODES="${natgw_config_dir}/natgw_nodes" # Read from stdin while read _ip _opts ; do |