1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-04 05:18:06 +03:00
samba-mirror/ctdb/tests/eventd/eventd_005.sh
Amitay Isaacs ca0894e932 ctdb-tests: Add tests for event daemon
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-12-18 14:23:23 +01:00

37 lines
634 B
Bash
Executable File

#!/bin/sh
. "${TEST_SCRIPTS_DIR}/unit.sh"
define_test "failing event script"
setup_eventd
cat > "$eventd_scriptdir/01.test" <<EOF
#!/bin/sh
exit 1
EOF
chmod +x "$eventd_scriptdir/01.test"
required_result 1 <<EOF
Failed to run event monitor, result=1
EOF
simple_test run monitor 30
required_result 1 <<EOF
01.test ERROR DURATION DATETIME
OUTPUT:
EOF
simple_test status monitor lastrun
required_result 0 <<EOF
Event monitor has never passed
EOF
simple_test status monitor lastpass
required_result 1 <<EOF
01.test ERROR DURATION DATETIME
OUTPUT:
EOF
simple_test status monitor lastfail