blob: 4e8d55397c0652e0f34d7099cb813366265ee126 (
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
|
#!/bin/sh
. "${TEST_SCRIPTS_DIR}/unit.sh"
PATH="$PATH:$CTDB_SCRIPTS_TOOLS_HELPER_DIR"
setup_ctdb_base "${CTDB_TEST_TMP_DIR}" "ctdb-etc"
conffile="${CTDB_BASE}/ctdb.conf"
scriptfile="${CTDB_BASE}/debug-hung-script.sh"
remove_files ()
{
rm -f "$conffile"
}
test_cleanup remove_files
cat > "$conffile" <<EOF
EOF
ok <<EOF
EOF
unit_test ctdb-config get "event" "debug script"
cat > "$conffile" <<EOF
[event]
debug script = debug-hung-script.sh
EOF
touch "$scriptfile"
required_result 22 <<EOF
debug script $scriptfile is not executable
conf: validation for option "debug script" failed
Failed to load config file $conffile
EOF
unit_test ctdb-config validate
chmod +x "$scriptfile"
ok_null
unit_test ctdb-config validate
rm -f "$scriptfile"
required_result 22 <<EOF
debug script $scriptfile does not exist
conf: validation for option "debug script" failed
Failed to load config file $conffile
EOF
unit_test ctdb-config validate
|