ctdb-config: Change option "no realtime" option to "realtime scheduling"
[Samba.git] / ctdb / tests / cunit / config_test_006.sh
blobd367cd48c2ef457bf9e071a4bcc97c80a60331b8
1 #!/bin/sh
3 . "${TEST_SCRIPTS_DIR}/unit.sh"
5 PATH="$PATH:$CTDB_SCRIPTS_HELPER_BINDIR"
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 true
23 EOF
24 unit_test ctdb-config get "legacy" "realtime scheduling"
26 ok <<EOF
27 true
28 EOF
29 unit_test ctdb-config get "legacy" "recmaster capability"
31 ok <<EOF
32 true
33 EOF
34 unit_test ctdb-config get "legacy" "lmaster capability"
36 ok <<EOF
37 false
38 EOF
39 unit_test ctdb-config get "legacy" "start as stopped"
41 ok <<EOF
42 false
43 EOF
44 unit_test ctdb-config get "legacy" "start as disabled"
46 ok <<EOF
47 ERROR
48 EOF
49 unit_test ctdb-config get "legacy" "script log level"
51 cat > "$conffile" <<EOF
52 [legacy]
53 script log level = INVALID
54 EOF
56 required_result 22 <<EOF
57 Invalid value for [legacy] -> script log level = INVALID
58 conf: validation for option "script log level" failed
59 Failed to load config file ${conffile}
60 EOF
61 unit_test ctdb-config validate