1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00
samba-mirror/ctdb/tests/eventscripts/10.interface.011.sh
Martin Schwenke 1061f48d03 ctdb-tests: Replace hardcoded IP address in test results
Parameterise them with a variable instead.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-07-11 11:48:37 +02:00

29 lines
545 B
Bash
Executable File

#!/bin/sh
. "${TEST_SCRIPTS_DIR}/unit.sh"
define_test "Release 1 IP, 10 connections killed, 1 fails"
setup
ctdb_get_1_public_address |
while read dev ip bits ; do
ok_null
simple_test_event "takeip" $dev $ip $bits
count=10
setup_tcp_connections $count \
"$ip" 445 10.254.254.0 12300
setup_tcp_connections_unkillable 1 \
"$ip" 445 10.254.254.0 43210
ok <<EOF
Killed 10/11 TCP connections to released IP ${ip}
Remaining connections:
${ip}:445 10.254.254.1:43211
EOF
simple_test_event "releaseip" $dev $ip $bits
done