summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-03-16 15:04:43 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-03-16 15:04:43 +0100
commit9e18ecc9bd14093b78199fd36c315cfce4d26a26 (patch)
tree4de2dcca5f9c2eeb8e5e1274b899850196e3f4b7 /tests
parentce1860a0bc77ec2ba7992547776a46df6b3d0e8a (diff)
downloadrsyslog-9e18ecc9bd14093b78199fd36c315cfce4d26a26.tar.gz
rsyslog-9e18ecc9bd14093b78199fd36c315cfce4d26a26.tar.xz
rsyslog-9e18ecc9bd14093b78199fd36c315cfce4d26a26.zip
fixed a regression of last patch and some cleanup
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am3
-rwxr-xr-xtests/diag.sh2
-rwxr-xr-xtests/failover-no-basic.sh19
-rw-r--r--tests/testsuites/failover-no-basic.conf9
4 files changed, 32 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3ca8efca..137e2115 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -51,6 +51,7 @@ TESTS = $(TESTRUNS) cfg.sh \
failover-basic.sh \
failover-rptd.sh \
failover-no-rptd.sh \
+ failover-no-basic.sh \
queue-persist.sh
if ENABLE_IMPTCP
@@ -222,6 +223,8 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \
testsuites/discard.conf \
failover-no-rptd.sh \
testsuites/failover-no-rptd.conf \
+ failover-no-basic.sh \
+ testsuites/failover-no-basic.conf \
failover-rptd.sh \
testsuites/failover-rptd.conf \
failover-basic.sh \
diff --git a/tests/diag.sh b/tests/diag.sh
index fc0d9000..3075aa57 100755
--- a/tests/diag.sh
+++ b/tests/diag.sh
@@ -31,7 +31,7 @@ case $1 in
rm -f work rsyslog.out.log rsyslog2.out.log rsyslog.out.log.save # common work files
rm -rf test-spool test-logdir
rm -f rsyslog.out.*.log rsyslog.random.data work-presort rsyslog.pipe
- rm -f rsyslog.input
+ rm -f rsyslog.input stat-file1
echo -------------------------------------------------------------------------------
;;
'startup') # start rsyslogd with default params. $2 is the config file name to use
diff --git a/tests/failover-no-basic.sh b/tests/failover-no-basic.sh
new file mode 100755
index 00000000..6177e10d
--- /dev/null
+++ b/tests/failover-no-basic.sh
@@ -0,0 +1,19 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[failover-no-basic.sh\]: basic test for failover functionality - no failover
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup failover-no-basic.conf
+source $srcdir/diag.sh injectmsg 0 5000
+echo doing shutdown
+source $srcdir/diag.sh shutdown-when-empty
+echo wait on shutdown
+source $srcdir/diag.sh wait-shutdown
+# now we need our custom logic to see if the result file is empty
+# (what it should be!)
+cmp rsyslog.out.log /dev/null
+if [ $? -eq 1 ]
+then
+ echo "ERROR, output file not empty"
+ exit 1
+fi
+source $srcdir/diag.sh exit
diff --git a/tests/testsuites/failover-no-basic.conf b/tests/testsuites/failover-no-basic.conf
new file mode 100644
index 00000000..b40ef7d7
--- /dev/null
+++ b/tests/testsuites/failover-no-basic.conf
@@ -0,0 +1,9 @@
+# see the equally-named .sh file for details
+$IncludeConfig diag-common.conf
+
+$RepeatedMsgReduction off
+
+# second action should never execute
+:msg, contains, "msgnum:" /dev/null
+$ActionExecOnlyWhenPreviousIsSuspended on
+& ./rsyslog.out.log