smbd: Simplify strict_lock_default with early returns
[Samba.git] / ctdb / tests / eventscripts / 13.per_ip_routing.012.sh
blob6c8a6ab4b33b289b74c1085cd10012d416e4d787
1 #!/bin/sh
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.
11 setup_ctdb
12 setup_ctdb_policy_routing
14 create_policy_routing_config 1 default
16 ctdb_get_1_public_address |
17 while read dev ip bits ; do
18 ok_null
19 simple_test_event "takeip" $dev $ip $bits
21 ok_null
22 ctdb moveip $ip 1
23 simple_test_event "releaseip" $dev $ip $bits
25 ok_null
26 simple_test_event "ipreallocated"
27 done
29 # all routes should have been removed and not added back
30 check_routes 0