lib:ldb: Use correct integer types for sizes
[vlendec/samba-autobuild/.git] / ctdb / tests / UNIT / eventscripts / 13.per_ip_routing.012.sh
1 #!/bin/sh
2
3 . "${TEST_SCRIPTS_DIR}/unit.sh"
4
5 define_test "1 IP configured, takeip, releaseip, ipreallocated"
6
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.
10
11 setup
12
13 create_policy_routing_config 1 default
14
15 ctdb_get_1_public_address |
16 while read dev ip bits ; do
17     ok_null
18     simple_test_event "takeip" $dev $ip $bits
19
20     ok_null
21     ctdb moveip $ip 1
22     simple_test_event "releaseip" $dev $ip $bits
23
24     ok_null
25     simple_test_event "ipreallocated"
26 done
27
28 # all routes should have been removed and not added back
29 check_routes 0