1#!/bin/sh 2 3. "${TEST_SCRIPTS_DIR}/unit.sh" 4 5define_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 11setup 12 13create_policy_routing_config 1 default 14 15ctdb_get_1_public_address | 16while 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" 26done 27 28# all routes should have been removed and not added back 29check_routes 0 30