ctdb-tests: Add NAT gateway eventscript unit tests for static routes
[Samba.git] / ctdb / tests / eventscripts / 11.natgw.022.sh
blob170ed8caf8418bfc8c9f5634d30316937c3374d9
1 #!/bin/sh
3 . "${TEST_SCRIPTS_DIR}/unit.sh"
5 define_test "slave node, static routes"
7 setup_ctdb
9 setup_ctdb_natgw <<EOF
10 192.168.1.21
11 192.168.1.22 master
12 192.168.1.23
13 192.168.1.24
14 EOF
16 export CTDB_NATGW_STATIC_ROUTES="10.1.1.0/24 10.1.2.0/24"
18 ok_null
19 simple_test_event "ipreallocated"
21 ok_natgw_slave_static_routes
22 simple_test_command ip route show
24 ok_natgw_slave_ip_addr_show
25 simple_test_command ip addr show "$CTDB_NATGW_PUBLIC_IFACE"