ctdb-tests: Replace hardcoded IP address in test results
[samba.git] / ctdb / tests / eventscripts / 10.interface.011.sh
1 #!/bin/sh
2
3 . "${TEST_SCRIPTS_DIR}/unit.sh"
4
5 define_test "Release 1 IP, 10 connections killed, 1 fails"
6
7 setup
8
9 ctdb_get_1_public_address |
10 while read dev ip bits ; do
11         ok_null
12         simple_test_event "takeip" $dev $ip $bits
13
14         count=10
15         setup_tcp_connections $count \
16                               "$ip" 445 10.254.254.0 12300
17
18         setup_tcp_connections_unkillable 1 \
19                                          "$ip" 445 10.254.254.0 43210
20
21         ok <<EOF
22 Killed 10/11 TCP connections to released IP ${ip}
23 Remaining connections:
24   ${ip}:445 10.254.254.1:43211
25 EOF
26
27         simple_test_event "releaseip" $dev $ip $bits
28 done