summaryrefslogtreecommitdiffstats
path: root/tests/sndrcv_failover.sh
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-06-20 15:57:15 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-06-20 15:57:15 +0200
commit9fcc6b7285c316b97d4178c9e264d6de432f88b6 (patch)
treefa5f90ca72e0fa2f1ae3c7393853ac24b5c6b777 /tests/sndrcv_failover.sh
parent656740b66307af24d1318d389c3ef0e7095460bc (diff)
downloadrsyslog-9fcc6b7285c316b97d4178c9e264d6de432f88b6.tar.gz
rsyslog-9fcc6b7285c316b97d4178c9e264d6de432f88b6.tar.xz
rsyslog-9fcc6b7285c316b97d4178c9e264d6de432f88b6.zip
testbench: added new tests for failover cases
Diffstat (limited to 'tests/sndrcv_failover.sh')
-rwxr-xr-xtests/sndrcv_failover.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/sndrcv_failover.sh b/tests/sndrcv_failover.sh
new file mode 100755
index 00000000..4c5e1831
--- /dev/null
+++ b/tests/sndrcv_failover.sh
@@ -0,0 +1,21 @@
+# This tests failover capabilities. Data is sent to local port 13516, where
+# no process shall listen. Then it fails over to a second instance, then to
+# a file. The second instance is started. So all data should be received
+# there and none be logged to the file.
+# This builds on the basic sndrcv.sh test, but adds a first, failing,
+# location to the conf file.
+# added 2011-06-20 by Rgerhards
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[sndrcv_failover.sh\]: testing failover capabilities for tcp sending
+source $srcdir/sndrcv_drvr_noexit.sh sndrcv_failover 50000
+ls -l rsyslog.empty
+if [[ -s rsyslog.empty ]] ; then
+ echo "FAIL: rsyslog.empty has data. Failover handling failed. Data is written"
+ echo " even though the previous action (in a failover chain!) properly"
+ echo " worked."
+ exit 1
+else
+ echo "rsyslog.empty is empty - OK"
+fi ;
+source $srcdir/diag.sh exit