wafsamba: fix pidl dependencies to rebuild on pidl changes
[Samba.git] / ctdb / tests / cunit / config_test_002.sh
blob6491fa811a1f9ee31db92c978d4274729276677b
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"
11 remove_files ()
13 rm -f "$conffile"
16 test_cleanup remove_files
18 cat > "$conffile" <<EOF
19 EOF
21 ok <<EOF
22 ERROR
23 EOF
24 unit_test ctdb-config get "logging" "log level"
26 cat > "$conffile" <<EOF
27 [logging]
28 location = syslog:magic
29 EOF
31 required_result 22 <<EOF
32 conf: validation for option "location" failed
33 Failed to load config file $conffile
34 EOF
35 unit_test ctdb-config validate
37 cat > "$conffile" <<EOF
38 [logging]
39 log level = high
40 EOF
42 required_result 22 <<EOF
43 conf: validation for option "log level" failed
44 Failed to load config file $conffile
45 EOF
46 unit_test ctdb-config validate
48 cat > "$conffile" <<EOF
49 [logging]
50 location = syslog
51 log level = notice
52 EOF
54 ok_null
55 unit_test ctdb-config validate
57 ok <<EOF
58 syslog
59 EOF
60 unit_test ctdb-config get "logging" "location"
62 ok <<EOF
63 notice
64 EOF
65 unit_test ctdb-config get "logging" "log level"