CVE-2016-0771: tests/dns: Remove dependencies on env variables
[Samba.git] / ctdb / tests / tool / stubby.getcapabilities.004.sh
blob4412883d4f1a59609e2ec0d390b9590dfeb4d375
1 #!/bin/sh
3 . "${TEST_SCRIPTS_DIR}/unit.sh"
5 define_test "3 nodes, all ok, non-default capabilities"
7 set -e
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
15 IFACES
16 :Name:LinkStatus:References:
17 :eth2:1:2:
18 :eth1:1:4:
20 VNNMAP
21 654321
26 required_result 0 <<EOF
27 RECMASTER: YES
28 LMASTER: YES
29 LVS: YES
30 EOF
32 simple_test -n 0 <<EOF
33 $input
34 EOF
36 required_result 0 <<EOF
37 RECMASTER: YES
38 LMASTER: NO
39 LVS: NO
40 EOF
42 simple_test -n 1 <<EOF
43 $input
44 EOF
46 required_result 0 <<EOF
47 RECMASTER: NO
48 LMASTER: YES
49 LVS: NO
50 EOF
52 simple_test -n 2 <<EOF
53 $input
54 EOF