|
Last change
on this file was 988, checked in by Silvan Scherrer, 9 years ago |
|
Samba Server: update vendor to version 4.4.3
|
|
File size:
660 bytes
|
| Line | |
|---|
| 1 | #!/bin/sh
|
|---|
| 2 |
|
|---|
| 3 | . "${TEST_SCRIPTS_DIR}/unit.sh"
|
|---|
| 4 |
|
|---|
| 5 | define_test "Release 1 IP, 10 connections killed OK"
|
|---|
| 6 |
|
|---|
| 7 | setup_ctdb
|
|---|
| 8 |
|
|---|
| 9 | ctdb_get_1_public_address |
|
|---|
| 10 | while read dev ip bits ; do
|
|---|
| 11 | ip addr add "${ip}/${bits}" dev "$dev"
|
|---|
| 12 |
|
|---|
| 13 | # Setup 10 fake connections...
|
|---|
| 14 | count=10
|
|---|
| 15 | out=""
|
|---|
| 16 | nl="
|
|---|
| 17 | "
|
|---|
| 18 | i=0
|
|---|
| 19 | while [ $i -lt $count ] ; do
|
|---|
| 20 | echo "${ip}:445 10.254.254.1:1230${i}"
|
|---|
| 21 | # Expected output for killing this connection
|
|---|
| 22 | out="${out}${out:+${nl}}Killing TCP connection 10.254.254.1:1230${i} ${ip}:445"
|
|---|
| 23 | i=$(($i + 1))
|
|---|
| 24 | done >"$FAKE_NETSTAT_TCP_ESTABLISHED_FILE"
|
|---|
| 25 |
|
|---|
| 26 | ok <<EOF
|
|---|
| 27 | $out
|
|---|
| 28 | Killed $count TCP connections to released IP $ip
|
|---|
| 29 | EOF
|
|---|
| 30 |
|
|---|
| 31 | simple_test $dev $ip $bits
|
|---|
| 32 | done
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.