c1706fd98e750dda29db301b4d14e3f8e5e6d9e1
[samba.git] / ctdb / tests / tool / ctdb.nodestatus.002.sh
1 #!/bin/sh
2
3 . "${TEST_SCRIPTS_DIR}/unit.sh"
4
5 define_test "all, 3 nodes, 1 disconnected"
6
7 setup_ctdbd <<EOF
8 NODEMAP
9 0       192.168.20.41   0x0
10 1       192.168.20.42   0x1
11 2       192.168.20.43   0x0     CURRENT RECMASTER
12
13 IFACES
14 :Name:LinkStatus:References:
15 :eth2:1:2:
16 :eth1:1:4:
17 EOF
18
19 required_result 1 <<EOF
20 Number of nodes:3
21 pnn:0 192.168.20.41    OK
22 pnn:1 192.168.20.42    DISCONNECTED|INACTIVE
23 pnn:2 192.168.20.43    OK (THIS NODE)
24 EOF
25 simple_test all
26
27 required_result 1 <<EOF
28 |Node|IP|Disconnected|Banned|Disabled|Unhealthy|Stopped|Inactive|PartiallyOnline|ThisNode|
29 |0|192.168.20.41|0|0|0|0|0|0|0|N|
30 |1|192.168.20.42|1|0|0|0|0|1|0|N|
31 |2|192.168.20.43|0|0|0|0|0|0|0|Y|
32 EOF
33 simple_test -X all