auth/spnego: set spnego_state->{state_position,expected_packet} gensec_spnego_create_...
[Samba.git] / ctdb / tests / eventd / eventd_002.sh
blobf4af69286e3f106181121b24cde96bbbae0cd3de
1 #!/bin/sh
3 . "${TEST_SCRIPTS_DIR}/unit.sh"
5 define_test "eventscript directory with random files"
7 setup_eventd
9 touch "$eventd_scriptdir/README"
11 cat > "$eventd_scriptdir/a.sh" <<EOF
12 #!/bin/sh
14 exit 1
15 EOF
17 required_result 0 <<EOF
18 No event scripts found
19 EOF
20 simple_test script list
22 required_result 22 <<EOF
23 Script name README is invalid
24 EOF
25 simple_test script enable README
27 required_result 22 <<EOF
28 Script name a.sh is invalid
29 EOF
30 simple_test script disable a.sh
32 required_result 2 <<EOF
33 Script 00.test does not exist
34 EOF
35 simple_test script enable 00.test
37 required_result 0 <<EOF
38 EOF
39 simple_test run monitor 30
41 required_result 0 <<EOF
42 Event monitor has never run
43 EOF
44 simple_test status monitor lastrun
46 required_result 0 <<EOF
47 Event monitor has never passed
48 EOF
49 simple_test status monitor lastpass
51 required_result 0 <<EOF
52 Event monitor has never failed
53 EOF
54 simple_test status monitor lastfail