3 .
"${TEST_SCRIPTS_DIR}/unit.sh"
5 define_test
"eventscript directory with random files"
9 touch "$eventd_scriptdir/README"
11 cat > "$eventd_scriptdir/a.sh" <<EOF
17 required_result
0 <<EOF
18 No event scripts found
20 simple_test
script list
22 required_result
22 <<EOF
23 Script name README is invalid
25 simple_test
script enable README
27 required_result
22 <<EOF
28 Script name a.sh is invalid
30 simple_test
script disable a.sh
32 required_result
2 <<EOF
33 Script 00.test does not exist
35 simple_test
script enable 00.
test
37 required_result
0 <<EOF
39 simple_test run monitor
30
41 required_result
0 <<EOF
42 Event monitor has never run
44 simple_test status monitor lastrun
46 required_result
0 <<EOF
47 Event monitor has never passed
49 simple_test status monitor lastpass
51 required_result
0 <<EOF
52 Event monitor has never failed
54 simple_test status monitor lastfail