rsyslog/tests/failover-basic-vg.sh
Rainer Gerhards dbe61eb06b
testbench: make some test files dynamic
This is work torward the ability to run the testbench in parallel.
Some small issues in tests have also been detected, which were not
previously seen. They have been fixed. We did not do separate
commits for this as it would clutter the commit log with not
really relevant info.

Also move some cleanup to "make clean" target

To support parallel testbench runs, we need to have dynamic work files.
So deleting work files on each test does not work, especially as we can
no longer assume they are "left-overs" from a failed test - they may
actually (and quite likely) belong to tests that run in parallel.

So the proper solution is to do via "make clean".

closes https://github.com/rsyslog/rsyslog/pull/2916
2018-08-13 15:04:47 +02:00

30 lines
780 B
Bash
Executable File

#!/bin/bash
# This file is part of the rsyslog project, released under GPLv3
uname
if [ `uname` = "FreeBSD" ] ; then
echo "This test currently does not work on FreeBSD."
exit 77
fi
echo ===============================================================================
echo \[failover-basic.sh\]: basic test for failover functionality
. $srcdir/diag.sh init
generate_conf
add_conf '
$template outfmt,"%msg:F,58:2%\n"
# note: the target server shall not be available!
:msg, contains, "msgnum:" @@127.0.0.1:13514
$ActionExecOnlyWhenPreviousIsSuspended on
& ./'"${RSYSLOG_OUT_LOG}"';outfmt
'
startup_vg
. $srcdir/diag.sh injectmsg 0 5000
echo doing shutdown
shutdown_when_empty
echo wait on shutdown
wait_shutdown_vg
. $srcdir/diag.sh check-exit-vg
seq_check 0 4999
exit_test