summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/UNIT/cunit/path_tests_001.sh
blob: 5713fc88bae4491c248f29b208181678c4b9399a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/sh

. "${TEST_SCRIPTS_DIR}/unit.sh"

PATH="$PATH:$CTDB_SCRIPTS_TOOLS_HELPER_DIR"

setup_ctdb_base "${CTDB_TEST_TMP_DIR}" "ctdb-etc"

ok <<EOF
$CTDB_BASE/ctdb.conf
EOF
unit_test ctdb-path config

ok <<EOF
$CTDB_BASE/run/foobar.pid
EOF
unit_test ctdb-path pidfile foobar

ok <<EOF
$CTDB_BASE/run/foobar.socket
EOF
unit_test ctdb-path socket foobar

ok <<EOF
$CTDB_BASE/share
EOF
unit_test ctdb-path datadir

ok <<EOF
$CTDB_BASE
EOF
unit_test ctdb-path etcdir

ok <<EOF
$CTDB_BASE/run
EOF
unit_test ctdb-path rundir

ok <<EOF
$CTDB_BASE/var
EOF
unit_test ctdb-path vardir

ok <<EOF
$CTDB_BASE/share/foobar
EOF
unit_test ctdb-path datadir append foobar

ok <<EOF
$CTDB_BASE/foobar
EOF
unit_test ctdb-path etcdir append foobar

ok <<EOF
$CTDB_BASE/run/foobar
EOF
unit_test ctdb-path rundir append foobar

ok <<EOF
$CTDB_BASE/var/foobar
EOF
unit_test ctdb-path vardir append foobar