1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

ctdb-tests: Use setup_script_options() in 05.system tests

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2018-03-21 22:18:56 +11:00 committed by Amitay Isaacs
parent 3712640d47
commit 45de2b1d9b
14 changed files with 26 additions and 4 deletions

View File

@ -6,7 +6,9 @@ define_test "Filesystem use check, good situation, 1 error check enabled"
setup
setup_script_options <<EOF
CTDB_MONITOR_FILESYSTEM_USAGE="/var::80"
EOF
ok_null
simple_test

View File

@ -6,7 +6,9 @@ define_test "Filesystem use check, error situation, 1 error check enabled"
setup
setup_script_options <<EOF
CTDB_MONITOR_FILESYSTEM_USAGE="/var::80"
EOF
set_fs_usage 90
required_result 1 <<EOF

View File

@ -6,7 +6,9 @@ define_test "Filesystem use check, warn situation, only error check enabled"
setup
setup_script_options <<EOF
CTDB_MONITOR_FILESYSTEM_USAGE="/var::80"
EOF
set_fs_usage 70
ok_null

View File

@ -6,7 +6,9 @@ define_test "Filesystem use check, warn situation, both checks enabled"
setup
setup_script_options <<EOF
CTDB_MONITOR_FILESYSTEM_USAGE="/var:80:90"
EOF
set_fs_usage 85
ok <<EOF

View File

@ -6,7 +6,9 @@ define_test "Filesystem use check, error situation, both checks enabled"
setup
setup_script_options <<EOF
CTDB_MONITOR_FILESYSTEM_USAGE="/var:80:90"
EOF
set_fs_usage 95
required_result 1 <<EOF

View File

@ -6,7 +6,9 @@ define_test "Filesystem use check, good situation, both checks enabled, multiple
setup
setup_script_options <<EOF
CTDB_MONITOR_FILESYSTEM_USAGE="/var:80:90 /:90:95"
EOF
ok_null
simple_test

View File

@ -6,8 +6,10 @@ define_test "Memory check, good situation, all memory checks enabled"
setup
setup_script_options <<EOF
CTDB_MONITOR_MEMORY_USAGE="80:90"
CTDB_MONITOR_SWAP_USAGE="1:50"
EOF
ok_null
simple_test

View File

@ -6,7 +6,9 @@ define_test "Memory check, bad situation, custom swap critical"
setup
setup_script_options <<EOF
CTDB_MONITOR_SWAP_USAGE=":50"
EOF
set_mem_usage 100 90
required_result 1 <<EOF

View File

@ -6,7 +6,9 @@ define_test "Memory check, bad memory situation, custom memory warning"
setup
setup_script_options <<EOF
CTDB_MONITOR_MEMORY_USAGE="85:"
EOF
set_mem_usage 90 10
ok <<EOF

View File

@ -6,7 +6,9 @@ define_test "Memory check, bad situation, custom memory critical"
setup
setup_script_options <<EOF
CTDB_MONITOR_MEMORY_USAGE=":85"
EOF
set_mem_usage 90 0
required_result 1 <<EOF

View File

@ -6,8 +6,10 @@ define_test "Memory check, bad situation, both memory checks, causes warning"
setup
setup_script_options <<EOF
CTDB_MONITOR_MEMORY_USAGE="80:90"
CTDB_MONITOR_SWAP_USAGE=""
EOF
set_mem_usage 87 0
ok <<EOF

View File

@ -6,7 +6,9 @@ define_test "Memory check, bad situation, both custom memory checks, causes unhe
setup
setup_script_options <<EOF
CTDB_MONITOR_MEMORY_USAGE="70:80"
EOF
set_mem_usage 87 0
required_result 1 <<EOF

View File

@ -6,8 +6,10 @@ define_test "Check throttling of warnings"
setup
setup_script_options <<EOF
CTDB_MONITOR_MEMORY_USAGE="70:80"
CTDB_MONITOR_SWAP_USAGE=""
EOF
# Below threshold, nothing logged
set_mem_usage 67 0

View File

@ -40,10 +40,6 @@ setup ()
{
setup_dbdir
export CTDB_MONITOR_MEMORY_USAGE=""
export CTDB_MONITOR_SWAP_USAGE=""
export CTDB_MONITOR_FILESYSTEM_USAGE=""
# Tests use default unless explicitly set
set_mem_usage
set_fs_usage