3 . "${TEST_SCRIPTS_DIR}/unit.sh"
5 define_test "1 IP configured, takeip, releaseip, ipreallocated"
7 # This partly tests the test infrastructure. If the (stub) "ctdb
8 # moveip" doesn't do anything then the IP being released will still be
9 # on the node and the ipreallocated event will add the routes back.
12 setup_ctdb_policy_routing
14 ctdb_get_1_public_address |
18 net=$(ipv4_host_addr_to_net "$ip" "$bits")
19 gw="${net%.*}.1" # a dumb, calculated default
21 cat >"$CTDB_PER_IP_ROUTING_CONF" <<EOF
28 simple_test_event "takeip" $dev $ip $bits
33 simple_test_event "releaseip" $dev $ip $bits
38 simple_test_event "ipreallocated"
42 0: from all lookup local
43 32766: from all lookup main
44 32767: from all lookup default
47 simple_test_command dump_routes