1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
samba-mirror/ctdb/tests/takeover/lcp2.033.sh
Martin Schwenke d011e70215 ctdb-tests: Add another LCP2 takeover test
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-07-29 07:38:13 +02:00

75 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
. "${TEST_SCRIPTS_DIR}/unit.sh"
define_test "12+4 IPs, 4 nodes, 2 -> 3 -> 4 healthy"
export CTDB_TEST_LOGLEVEL=0
set -e
echo "Nodes 2, 3 disconnected -> node 2 attaches"
required_result <<EOF
130.216.30.181 2
130.216.30.180 0
130.216.30.179 2
130.216.30.178 1
130.216.30.177 0
130.216.30.176 1
130.216.30.175 0
130.216.30.174 2
130.216.30.173 1
130.216.30.172 2
130.216.30.171 1
130.216.30.170 0
10.19.99.253 2
10.19.99.252 0
10.19.99.251 1
10.19.99.250 0
EOF
simple_test 0,0,0,1 <<EOF
10.19.99.253 1
10.19.99.252 0
10.19.99.251 1
10.19.99.250 0
130.216.30.181 1
130.216.30.180 0
130.216.30.179 0
130.216.30.178 1
130.216.30.177 0
130.216.30.176 1
130.216.30.175 0
130.216.30.174 1
130.216.30.173 1
130.216.30.172 0
130.216.30.171 1
130.216.30.170 0
EOF
echo "Node 3 attaches"
required_result <<EOF
130.216.30.181 2
130.216.30.180 3
130.216.30.179 3
130.216.30.178 1
130.216.30.177 0
130.216.30.176 1
130.216.30.175 0
130.216.30.174 2
130.216.30.173 3
130.216.30.172 2
130.216.30.171 1
130.216.30.170 0
10.19.99.253 2
10.19.99.252 3
10.19.99.251 1
10.19.99.250 0
EOF
simple_test 0,0,0,0 <<EOF
$_out
EOF