auth/spnego: set spnego_state->{state_position,expected_packet} gensec_spnego_create_...
[Samba.git] / ctdb / tests / eventd / eventd_011.sh
blobd600e4f6035f3e854dae2412c03f4ee9474ca481
1 #!/bin/sh
3 . "${TEST_SCRIPTS_DIR}/unit.sh"
5 define_test "multiple events"
7 setup_eventd
9 cat > "$eventd_scriptdir/01.test" <<EOF
10 #!/bin/sh
12 echo "args: \$*"
14 case "\$1" in
15 startup)
16 exit 0
18 monitor)
19 exit 1
21 esac
22 EOF
23 chmod +x "$eventd_scriptdir/01.test"
25 required_result 0 <<EOF
26 EOF
27 simple_test run startup 30
29 required_result 0 <<EOF
30 01.test OK DURATION DATETIME
31 EOF
32 simple_test status startup lastrun
34 required_result 0 <<EOF
35 01.test OK DURATION DATETIME
36 EOF
37 simple_test status startup lastpass
39 required_result 0 <<EOF
40 Event startup has never failed
41 EOF
42 simple_test status startup lastfail
44 required_result 1 <<EOF
45 Failed to run event monitor, result=1
46 EOF
47 simple_test run monitor 30
49 required_result 1 <<EOF
50 01.test ERROR DURATION DATETIME
51 OUTPUT: args: monitor
52 EOF
53 simple_test status monitor lastrun
55 required_result 0 <<EOF
56 Event monitor has never passed
57 EOF
58 simple_test status monitor lastpass
60 required_result 1 <<EOF
61 01.test ERROR DURATION DATETIME
62 OUTPUT: args: monitor
63 EOF
64 simple_test status monitor lastfail