ctdb-tools: Drop support for setting and viewing NAT gateway capability
[ambi/samba-autobuild/.git] / ctdb / tests / tool / stubby.getcapabilities.004.sh
1 #!/bin/sh
2
3 . "${TEST_SCRIPTS_DIR}/unit.sh"
4
5 define_test "3 nodes, all ok, non-default capabilities"
6
7 set -e
8
9 input="\
10 NODEMAP
11 0       192.168.20.41   0x0     CURRENT RECMASTER CTDB_CAP_LVS
12 1       192.168.20.42   0x0     -CTDB_CAP_LMASTER
13 2       192.168.20.43   0x0     -CTDB_CAP_RECMASTER
14
15 IFACES
16 :Name:LinkStatus:References:
17 :eth2:1:2:
18 :eth1:1:4:
19
20 VNNMAP
21 654321
22 0
23 1
24 2"
25
26 required_result 0 <<EOF
27 RECMASTER: YES
28 LMASTER: YES
29 LVS: YES
30 EOF
31
32 simple_test -n 0 <<EOF
33 $input
34 EOF
35
36 required_result 0 <<EOF
37 RECMASTER: YES
38 LMASTER: NO
39 LVS: NO
40 EOF
41
42 simple_test -n 1 <<EOF
43 $input
44 EOF
45
46 required_result 0 <<EOF
47 RECMASTER: NO
48 LMASTER: YES
49 LVS: NO
50 EOF
51
52 simple_test -n 2 <<EOF
53 $input
54 EOF