smbd: Simplify strict_lock_default with early returns
[Samba.git] / ctdb / tests / eventscripts / 13.per_ip_routing.014.sh
blobee08c36fa322761cb235279031d55a7f43fae609
1 #!/bin/sh
3 . "${TEST_SCRIPTS_DIR}/unit.sh"
5 define_test "1 IP configured, takeip, moveip, ipreallocated"
7 # We move the IP to another node but don't run releaseip.
8 # ipreallocated should remove the bogus routes.
10 setup_ctdb
11 setup_ctdb_policy_routing
13 create_policy_routing_config 1 default
15 ctdb_get_1_public_address |
16 while read dev ip bits ; do
17 ok_null
18 # Set up the routes for an IP that we have
19 simple_test_event "takeip" $dev $ip $bits
21 # Now move that IPs but don't run the associated "releaseip"
22 ctdb moveip $ip 1
24 # This should handle removal of the routes
25 ok "Removing ip rule/routes for unhosted public address $ip"
26 simple_test_event "ipreallocated"
27 done
29 # no routes left
30 check_routes 0