Merge branch 'master' of ctdb into 'master' of samba
[samba.git] / ctdb / tests / eventscripts / 13.per_ip_routing.015.sh
1 #!/bin/sh
2
3 . "${TEST_SCRIPTS_DIR}/unit.sh"
4
5 define_test "1 IP configured, releaseip of unassigned"
6
7 setup_ctdb
8 setup_ctdb_policy_routing
9
10 export IP_ROUTE_BAD_TABLE_ID=true
11
12 create_policy_routing_config 1 default
13
14 ctdb_get_1_public_address |
15 {
16     read dev ip bits
17
18     ok <<EOF
19 WARNING: Failed to delete policy routing rule
20   Command "ip rule del from $ip pref $CTDB_PER_IP_ROUTING_RULE_PREF table ctdb.$ip" failed:
21   Error: argument ctdb.$ip is wrong: invalid table ID
22   Error: argument ctdb.$ip is wrong: table id value is invalid
23 EOF
24
25     simple_test_event "releaseip" $dev $ip $bits
26 }
27
28
29 # there should be no routes
30 check_routes 0