mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
ca0894e932
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
49 lines
880 B
Bash
Executable File
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
|