git.samba.org
/
metze
/
samba
/
wip.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
ctdb-tests: Use setup_script_options() in 05.system tests
[metze/samba/wip.git]
/
ctdb
/
tests
/
eventscripts
/
05.system.monitor.015.sh
1
#!/bin/sh
2
3
. "${TEST_SCRIPTS_DIR}/unit.sh"
4
5
define_test "Memory check, bad situation, custom memory critical"
6
7
setup
8
9
setup_script_options <<EOF
10
CTDB_MONITOR_MEMORY_USAGE=":85"
11
EOF
12
13
set_mem_usage 90 0
14
required_result 1 <<EOF
15
ERROR: System memory utilization 90% >= threshold 85%
16
$FAKE_PROC_MEMINFO
17
$(ps foobar)
18
EOF
19
20
simple_test