ctdb-tests: Allow use of setup_ctdb_base() outside of test cases
[vlendec/samba-autobuild/.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
8
9 export IP_ROUTE_BAD_TABLE_ID=true
10
11 create_policy_routing_config 1 default
12
13 ctdb_get_1_public_address |
14 {
15     read dev ip bits
16
17     ok <<EOF
18 WARNING: Failed to delete policy routing rule
19   Command "ip rule del from $ip pref $CTDB_PER_IP_ROUTING_RULE_PREF table ctdb.$ip" failed:
20   Error: argument ctdb.$ip is wrong: invalid table ID
21   Error: argument ctdb.$ip is wrong: table id value is invalid
22 EOF
23
24     simple_test_event "releaseip" $dev $ip $bits
25 }
26
27
28 # there should be no routes
29 check_routes 0