1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
samba-mirror/ctdb/tests/eventd/eventd_042.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

49 lines
880 B
Bash
Executable File

#!/bin/sh
. "${TEST_SCRIPTS_DIR}/unit.sh"
define_test "releaseip event"
cat > "$eventd_scriptdir/01.test" <<EOF
#!/bin/sh
echo \$*
if [ \$# -ne 4 ] ; then
echo "Wrong number of arguments"
exit 2
fi
exit 0
EOF
chmod +x "$eventd_scriptdir/01.test"
setup_eventd
required_result 1 <<EOF
Insufficient arguments for event releaseip
EOF
simple_test run releaseip 30
required_result 0 <<EOF
Event releaseip has never run
EOF
simple_test status releaseip lastrun
required_result 0 <<EOF
EOF
simple_test run releaseip 30 eth0 192.168.1.1 24
required_result 0 <<EOF
01.test OK DURATION DATETIME
EOF
simple_test status releaseip lastrun
required_result 0 <<EOF
01.test OK DURATION DATETIME
EOF
simple_test status releaseip lastpass
required_result 0 <<EOF
Event releaseip has never failed
EOF
simple_test status releaseip lastfail