diff options
author | Martin Schwenke <martin@meltin.net> | 2014-03-14 16:29:01 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2014-03-26 04:21:41 +0100 |
commit | 7fdd6b7861a4767cd3e2dfa76a7d7e7790efd840 (patch) | |
tree | 10a8bafc0f96e89d3df24e796cd7ec2f62ade3c7 /ctdb/tests/eventscripts/11.natgw.011.sh | |
parent | feeb9843bf46d00beb10f3e959ba0f73f5e33e8c (diff) | |
download | samba-7fdd6b7861a4767cd3e2dfa76a7d7e7790efd840.tar.gz |
ctdb-tests: Add some tests for 11.natgw eventscript
This includes adding support for:
* Configuring fake NATGW state in the eventscript unit tests
* "natgwlist" and "setnatgwstate" in ctdb command stub
* ip command stub to default to "main table" when no table specified,
allow routes to be added without "dev" option (just add a default
dev), support "metric" option
Signed-off-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/tests/eventscripts/11.natgw.011.sh')
-rwxr-xr-x | ctdb/tests/eventscripts/11.natgw.011.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ctdb/tests/eventscripts/11.natgw.011.sh b/ctdb/tests/eventscripts/11.natgw.011.sh new file mode 100755 index 00000000000..4c5a937d553 --- /dev/null +++ b/ctdb/tests/eventscripts/11.natgw.011.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +. "${TEST_SCRIPTS_DIR}/unit.sh" + +define_test "master node, basic configuration" + +setup_ctdb + +setup_ctdb_natgw <<EOF +192.168.1.21 master +192.168.1.22 +192.168.1.23 +192.168.1.24 +EOF + +ok_null +simple_test_event "ipreallocated" + +ok "default via ${CTDB_NATGW_DEFAULT_GATEWAY} dev ethXXX metric 10 " +simple_test_command ip route show + +ok_natgw_master_ip_addr_show +simple_test_command ip addr show "$CTDB_NATGW_PUBLIC_IFACE" |