mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
ctdb-tests: Make ctdb natgw tool tests cover all the desired outputs
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
515e2a2d87
commit
cc3e9a651d
@ -10,15 +10,7 @@ setup_natgw <<EOF
|
||||
192.168.20.43
|
||||
EOF
|
||||
|
||||
required_result 0 <<EOF
|
||||
0 192.168.20.41
|
||||
Number of nodes:3
|
||||
pnn:0 192.168.20.41 OK (THIS NODE)
|
||||
pnn:1 192.168.20.42 OK
|
||||
pnn:2 192.168.20.43 OK
|
||||
EOF
|
||||
|
||||
simple_test <<EOF
|
||||
ctdb_state="\
|
||||
NODEMAP
|
||||
0 192.168.20.41 0x0 CURRENT RECMASTER
|
||||
1 192.168.20.42 0x0
|
||||
@ -34,4 +26,38 @@ VNNMAP
|
||||
0
|
||||
1
|
||||
2
|
||||
"
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
0 192.168.20.41
|
||||
EOF
|
||||
|
||||
simple_test master <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
192.168.20.41 MASTER
|
||||
192.168.20.42
|
||||
192.168.20.43
|
||||
EOF
|
||||
|
||||
simple_test list <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
pnn:0 192.168.20.41 OK (THIS NODE)
|
||||
pnn:1 192.168.20.42 OK
|
||||
pnn:2 192.168.20.43 OK
|
||||
EOF
|
||||
|
||||
simple_test status <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
@ -10,15 +10,7 @@ setup_natgw <<EOF
|
||||
192.168.20.43
|
||||
EOF
|
||||
|
||||
required_result 0 <<EOF
|
||||
1 192.168.20.42
|
||||
Number of nodes:3
|
||||
pnn:0 192.168.20.41 UNHEALTHY
|
||||
pnn:1 192.168.20.42 OK (THIS NODE)
|
||||
pnn:2 192.168.20.43 OK
|
||||
EOF
|
||||
|
||||
simple_test <<EOF
|
||||
ctdb_state="\
|
||||
NODEMAP
|
||||
0 192.168.20.41 0x2
|
||||
1 192.168.20.42 0x0 CURRENT RECMASTER
|
||||
@ -34,4 +26,39 @@ IFACES
|
||||
:Name:LinkStatus:References:
|
||||
:eth2:1:2:
|
||||
:eth1:1:4:
|
||||
"
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
1 192.168.20.42
|
||||
EOF
|
||||
|
||||
simple_test master <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
192.168.20.41
|
||||
192.168.20.42 MASTER
|
||||
192.168.20.43
|
||||
EOF
|
||||
|
||||
simple_test list <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
pnn:0 192.168.20.41 UNHEALTHY
|
||||
pnn:1 192.168.20.42 OK (THIS NODE)
|
||||
pnn:2 192.168.20.43 OK
|
||||
EOF
|
||||
|
||||
simple_test status <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
||||
|
@ -9,14 +9,7 @@ setup_natgw <<EOF
|
||||
192.168.20.43
|
||||
EOF
|
||||
|
||||
required_result 0 <<EOF
|
||||
2 192.168.20.43
|
||||
Number of nodes:2
|
||||
pnn:0 192.168.20.41 UNHEALTHY
|
||||
pnn:2 192.168.20.43 OK
|
||||
EOF
|
||||
|
||||
simple_test <<EOF
|
||||
ctdb_state="\
|
||||
NODEMAP
|
||||
0 192.168.20.41 0x2
|
||||
1 192.168.20.42 0x0 CURRENT RECMASTER
|
||||
@ -32,4 +25,36 @@ IFACES
|
||||
:Name:LinkStatus:References:
|
||||
:eth2:1:2:
|
||||
:eth1:1:4:
|
||||
"
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
2 192.168.20.43
|
||||
EOF
|
||||
|
||||
simple_test master <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
192.168.20.41
|
||||
192.168.20.43 MASTER
|
||||
EOF
|
||||
|
||||
simple_test list <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
pnn:0 192.168.20.41 UNHEALTHY
|
||||
pnn:2 192.168.20.43 OK
|
||||
EOF
|
||||
|
||||
simple_test status <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
@ -10,15 +10,7 @@ setup_natgw <<EOF
|
||||
192.168.20.43
|
||||
EOF
|
||||
|
||||
required_result 0 <<EOF
|
||||
2 192.168.20.43
|
||||
Number of nodes:3
|
||||
pnn:0 192.168.20.41 UNHEALTHY|STOPPED|INACTIVE
|
||||
pnn:1 192.168.20.42 UNHEALTHY|STOPPED|INACTIVE (THIS NODE)
|
||||
pnn:2 192.168.20.43 UNHEALTHY
|
||||
EOF
|
||||
|
||||
simple_test <<EOF
|
||||
ctdb_state="\
|
||||
NODEMAP
|
||||
0 192.168.20.41 0x22
|
||||
1 192.168.20.42 0x22 CURRENT RECMASTER
|
||||
@ -34,4 +26,38 @@ IFACES
|
||||
:Name:LinkStatus:References:
|
||||
:eth2:1:2:
|
||||
:eth1:1:4:
|
||||
"
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
2 192.168.20.43
|
||||
EOF
|
||||
|
||||
simple_test master <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
192.168.20.41
|
||||
192.168.20.42
|
||||
192.168.20.43 MASTER
|
||||
EOF
|
||||
|
||||
simple_test list <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
pnn:0 192.168.20.41 UNHEALTHY|STOPPED|INACTIVE
|
||||
pnn:1 192.168.20.42 UNHEALTHY|STOPPED|INACTIVE (THIS NODE)
|
||||
pnn:2 192.168.20.43 UNHEALTHY
|
||||
EOF
|
||||
|
||||
simple_test status <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
@ -10,15 +10,7 @@ setup_natgw <<EOF
|
||||
192.168.20.43
|
||||
EOF
|
||||
|
||||
required_result 0 <<EOF
|
||||
0 192.168.20.41
|
||||
Number of nodes:3
|
||||
pnn:0 192.168.20.41 STOPPED|INACTIVE
|
||||
pnn:1 192.168.20.42 STOPPED|INACTIVE (THIS NODE)
|
||||
pnn:2 192.168.20.43 STOPPED|INACTIVE
|
||||
EOF
|
||||
|
||||
simple_test <<EOF
|
||||
ctdb_state="\
|
||||
NODEMAP
|
||||
0 192.168.20.41 0x20
|
||||
1 192.168.20.42 0x20 CURRENT RECMASTER
|
||||
@ -34,4 +26,38 @@ IFACES
|
||||
:Name:LinkStatus:References:
|
||||
:eth2:1:2:
|
||||
:eth1:1:4:
|
||||
"
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
0 192.168.20.41
|
||||
EOF
|
||||
|
||||
simple_test master <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
192.168.20.41 MASTER
|
||||
192.168.20.42
|
||||
192.168.20.43
|
||||
EOF
|
||||
|
||||
simple_test list <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
pnn:0 192.168.20.41 STOPPED|INACTIVE
|
||||
pnn:1 192.168.20.42 STOPPED|INACTIVE (THIS NODE)
|
||||
pnn:2 192.168.20.43 STOPPED|INACTIVE
|
||||
EOF
|
||||
|
||||
simple_test status <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
@ -10,15 +10,7 @@ setup_natgw <<EOF
|
||||
192.168.20.43
|
||||
EOF
|
||||
|
||||
required_result 0 <<EOF
|
||||
1 192.168.20.42
|
||||
Number of nodes:3
|
||||
pnn:0 192.168.20.41 STOPPED|INACTIVE
|
||||
pnn:1 192.168.20.42 STOPPED|INACTIVE (THIS NODE)
|
||||
pnn:2 192.168.20.43 STOPPED|INACTIVE
|
||||
EOF
|
||||
|
||||
simple_test <<EOF
|
||||
ctdb_state="\
|
||||
NODEMAP
|
||||
0 192.168.20.41 0x20
|
||||
1 192.168.20.42 0x20 CURRENT RECMASTER
|
||||
@ -34,4 +26,38 @@ IFACES
|
||||
:Name:LinkStatus:References:
|
||||
:eth2:1:2:
|
||||
:eth1:1:4:
|
||||
"
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
1 192.168.20.42
|
||||
EOF
|
||||
|
||||
simple_test master <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
192.168.20.41 slave-only
|
||||
192.168.20.42 MASTER
|
||||
192.168.20.43
|
||||
EOF
|
||||
|
||||
simple_test list <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
pnn:0 192.168.20.41 STOPPED|INACTIVE
|
||||
pnn:1 192.168.20.42 STOPPED|INACTIVE (THIS NODE)
|
||||
pnn:2 192.168.20.43 STOPPED|INACTIVE
|
||||
EOF
|
||||
|
||||
simple_test status <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
@ -10,15 +10,7 @@ setup_natgw <<EOF
|
||||
192.168.20.43 slave-only
|
||||
EOF
|
||||
|
||||
required_result 2 <<EOF
|
||||
-1 0.0.0.0
|
||||
Number of nodes:3
|
||||
pnn:0 192.168.20.41 STOPPED|INACTIVE
|
||||
pnn:1 192.168.20.42 STOPPED|INACTIVE (THIS NODE)
|
||||
pnn:2 192.168.20.43 STOPPED|INACTIVE
|
||||
EOF
|
||||
|
||||
simple_test <<EOF
|
||||
ctdb_state="\
|
||||
NODEMAP
|
||||
0 192.168.20.41 0x20
|
||||
1 192.168.20.42 0x20 CURRENT RECMASTER
|
||||
@ -34,4 +26,37 @@ IFACES
|
||||
:Name:LinkStatus:References:
|
||||
:eth2:1:2:
|
||||
:eth1:1:4:
|
||||
"
|
||||
|
||||
#####
|
||||
|
||||
required_result 2 <<EOF
|
||||
EOF
|
||||
|
||||
simple_test master <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
192.168.20.41 slave-only
|
||||
192.168.20.42 slave-only
|
||||
192.168.20.43 slave-only
|
||||
EOF
|
||||
|
||||
simple_test list <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
pnn:0 192.168.20.41 STOPPED|INACTIVE
|
||||
pnn:1 192.168.20.42 STOPPED|INACTIVE (THIS NODE)
|
||||
pnn:2 192.168.20.43 STOPPED|INACTIVE
|
||||
EOF
|
||||
|
||||
simple_test status <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
@ -10,15 +10,7 @@ setup_natgw <<EOF
|
||||
192.168.20.43
|
||||
EOF
|
||||
|
||||
required_result 0 <<EOF
|
||||
1 192.168.20.42
|
||||
Number of nodes:3
|
||||
pnn:0 192.168.20.41 DISCONNECTED|INACTIVE
|
||||
pnn:1 192.168.20.42 OK (THIS NODE)
|
||||
pnn:2 192.168.20.43 OK
|
||||
EOF
|
||||
|
||||
simple_test <<EOF
|
||||
ctdb_state="\
|
||||
NODEMAP
|
||||
0 192.168.20.41 0x1
|
||||
1 192.168.20.42 0x0 CURRENT RECMASTER
|
||||
@ -34,4 +26,38 @@ IFACES
|
||||
:Name:LinkStatus:References:
|
||||
:eth2:1:2:
|
||||
:eth1:1:4:
|
||||
"
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
1 192.168.20.42
|
||||
EOF
|
||||
|
||||
simple_test master <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
192.168.20.41
|
||||
192.168.20.42 MASTER
|
||||
192.168.20.43
|
||||
EOF
|
||||
|
||||
simple_test list <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
||||
|
||||
#####
|
||||
|
||||
required_result 0 <<EOF
|
||||
pnn:0 192.168.20.41 DISCONNECTED|INACTIVE
|
||||
pnn:1 192.168.20.42 OK (THIS NODE)
|
||||
pnn:2 192.168.20.43 OK
|
||||
EOF
|
||||
|
||||
simple_test status <<EOF
|
||||
$ctdb_state
|
||||
EOF
|
Loading…
x
Reference in New Issue
Block a user