3 .
"${TEST_SCRIPTS_DIR}/unit.sh"
5 define_test
"basic configuration, multiple transitions"
9 echo "*** Master node..."
11 setup_ctdb_natgw
<<EOF
19 simple_test_event
"ipreallocated"
21 ok
"default via ${CTDB_NATGW_DEFAULT_GATEWAY} dev ethXXX metric 10 "
22 simple_test_command ip route show
24 ok_natgw_master_ip_addr_show
25 simple_test_command ip addr show
"$CTDB_NATGW_PUBLIC_IFACE"
27 echo "*** Slave node..."
29 setup_ctdb_natgw
<<EOF
36 ok
"NAT gateway configuration has changed"
37 simple_test_event
"ipreallocated"
39 ok
"default via ${FAKE_CTDB_NATGW_MASTER} dev ethXXX metric 10 "
40 simple_test_command ip route show
42 ok_natgw_slave_ip_addr_show
43 simple_test_command ip addr show
"$CTDB_NATGW_PUBLIC_IFACE"
45 echo "*** Master node again..."
47 setup_ctdb_natgw
<<EOF
54 ok
"NAT gateway configuration has changed"
55 simple_test_event
"ipreallocated"
57 ok
"default via ${CTDB_NATGW_DEFAULT_GATEWAY} dev ethXXX metric 10 "
58 simple_test_command ip route show
60 ok_natgw_master_ip_addr_show
61 simple_test_command ip addr show
"$CTDB_NATGW_PUBLIC_IFACE"