wafsamba: fix pidl dependencies to rebuild on pidl changes
[Samba.git] / ctdb / tests / cunit / config_test_003.sh
blob28b06226866fcb01ae0eb85aa9425cc302d2088c
1 #!/bin/sh
3 . "${TEST_SCRIPTS_DIR}/unit.sh"
5 PATH="$PATH:$CTDB_SCRIPTS_TOOLS_HELPER_DIR"
7 setup_ctdb_base "${TEST_VAR_DIR}" "cunit"
9 conffile="${CTDB_BASE}/ctdb.conf"
10 scriptfile="${CTDB_BASE}/debug-hung-script.sh"
12 remove_files ()
14 rm -f "$conffile"
17 test_cleanup remove_files
19 cat > "$conffile" <<EOF
20 EOF
22 ok <<EOF
23 EOF
24 unit_test ctdb-config get "event" "debug script"
26 cat > "$conffile" <<EOF
27 [event]
28 debug script = debug-hung-script.sh
29 EOF
31 touch "$scriptfile"
33 required_result 22 <<EOF
34 debug script $scriptfile is not executable
35 conf: validation for option "debug script" failed
36 Failed to load config file $conffile
37 EOF
38 unit_test ctdb-config validate
40 chmod +x "$scriptfile"
42 ok_null
43 unit_test ctdb-config validate
45 rm -f "$scriptfile"
47 required_result 22 <<EOF
48 debug script $scriptfile does not exist
49 conf: validation for option "debug script" failed
50 Failed to load config file $conffile
51 EOF
52 unit_test ctdb-config validate