3 .
"${TEST_SCRIPTS_DIR}/unit.sh"
5 conffile
="${CTDB_TEST_TMP_DIR}/config.$$"
12 test_cleanup remove_files
18 conf: unknown section [section1]
23 conf: option "key1" already exists
28 conf: option "key1" already exists
37 key1 = foobar # temporary
39 key3 = false # temporary
44 conf: validation for option "key1" failed
45 conf: validation for option "key2" failed
46 conf: validation for option "key3" failed
50 cat > "$conffile" <<EOF
54 required_error EINVAL
<<EOF
55 conf: validation for section [section1] failed
59 unit_test conf_test
8 "$conffile"
61 cat > "$conffile" <<EOF
66 required_error EINVAL
<<EOF
67 conf: validation for section [section1] failed
71 unit_test conf_test
8 "$conffile"
73 cat > "$conffile" <<EOF
78 required_error EINVAL
<<EOF
79 conf: empty value [section1] -> "key1"
83 key3 = false # temporary
85 unit_test conf_test
9 "$conffile"
87 cat > "$conffile" <<EOF
92 required_error EINVAL
<<EOF
93 conf: empty value [section1] -> "key3"
97 key3 = false # temporary
99 unit_test conf_test
9 "$conffile"
101 cat > "$conffile" <<EOF
115 unit_test conf_test
9 "$conffile"
117 cat > "$conffile" <<EOF
128 unit_test conf_test
9 "$conffile"
130 cat > "$conffile" <<EOF
135 required_error EINVAL
<<EOF
136 conf: unknown section [section2]
137 conf: unknown section for option "foo"
141 key3 = false # temporary
143 unit_test conf_test
10 "$conffile"
145 cat > "$conffile" <<EOF
152 required_error EINVAL
<<EOF
153 conf: unknown option [section1] -> "foo"
157 key3 = false # temporary
159 unit_test conf_test
10 "$conffile"
161 cat > "$conffile" <<EOF
168 touch "${conffile}.reload"
176 unit_test conf_test
11 "$conffile"
178 cat > "$conffile" <<EOF
185 cat > "${conffile}.reload" <<EOF
196 unit_test conf_test
11 "$conffile"