summaryrefslogtreecommitdiffstats
path: root/tests/testsuites
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testsuites')
-rw-r--r--tests/testsuites/1.field13
-rw-r--r--tests/testsuites/1.inputname_imtcp_125143
-rw-r--r--tests/testsuites/1.inputname_imtcp_125153
-rw-r--r--tests/testsuites/1.inputname_imtcp_125163
-rw-r--r--tests/testsuites/3.parse13
-rw-r--r--tests/testsuites/diag-common.conf16
-rw-r--r--tests/testsuites/diskqueue.conf16
-rw-r--r--tests/testsuites/field1.conf8
-rw-r--r--tests/testsuites/imtcp-multiport.conf13
-rw-r--r--tests/testsuites/inputname_imtcp.conf19
-rw-r--r--tests/testsuites/manytcp.conf13
-rw-r--r--tests/testsuites/omod-if-array.conf3
-rw-r--r--tests/testsuites/parse1.conf3
-rw-r--r--tests/testsuites/queue-persist.conf21
14 files changed, 123 insertions, 4 deletions
diff --git a/tests/testsuites/1.field1 b/tests/testsuites/1.field1
new file mode 100644
index 00000000..54751171
--- /dev/null
+++ b/tests/testsuites/1.field1
@@ -0,0 +1,3 @@
+<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005: DROP_url_www.sina.com.cn:IN=eth1 OUT=eth0 SRC=192.168.10.78 DST=61.172.201.194 LEN=1182 TOS=0x00 PREC=0x00 TTL=63 ID=14368 DF PROTO=TCP SPT=33343 DPT=80 WINDOW=92 RES=0x00 ACK PSH URGP=0
+DROP_url_www.sina.com.cn:IN=eth1
+#Only the first two lines are important, you may place anything behind them!
diff --git a/tests/testsuites/1.inputname_imtcp_12514 b/tests/testsuites/1.inputname_imtcp_12514
new file mode 100644
index 00000000..178b1724
--- /dev/null
+++ b/tests/testsuites/1.inputname_imtcp_12514
@@ -0,0 +1,3 @@
+<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005: MSG
+12514
+#Only the first two lines are important, you may place anything behind them!
diff --git a/tests/testsuites/1.inputname_imtcp_12515 b/tests/testsuites/1.inputname_imtcp_12515
new file mode 100644
index 00000000..d616098b
--- /dev/null
+++ b/tests/testsuites/1.inputname_imtcp_12515
@@ -0,0 +1,3 @@
+<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005: MSG
+12515
+#Only the first two lines are important, you may place anything behind them!
diff --git a/tests/testsuites/1.inputname_imtcp_12516 b/tests/testsuites/1.inputname_imtcp_12516
new file mode 100644
index 00000000..8e6997ce
--- /dev/null
+++ b/tests/testsuites/1.inputname_imtcp_12516
@@ -0,0 +1,3 @@
+<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005: MSG
+12516
+#Only the first two lines are important, you may place anything behind them!
diff --git a/tests/testsuites/3.parse1 b/tests/testsuites/3.parse1
new file mode 100644
index 00000000..a6b4e884
--- /dev/null
+++ b/tests/testsuites/3.parse1
@@ -0,0 +1,3 @@
+<38>Apr 6 15:07:10 lxcvs07 sshd(pam_unix)[31738]: session closed for user cvsadmin
+38,auth,info,Apr 6 15:07:10,lxcvs07,sshd(pam_unix),sshd(pam_unix)[31738]:, session closed for user cvsadmin
+# yet another real-life sample where we had some issues with
diff --git a/tests/testsuites/diag-common.conf b/tests/testsuites/diag-common.conf
new file mode 100644
index 00000000..9e9e28fe
--- /dev/null
+++ b/tests/testsuites/diag-common.conf
@@ -0,0 +1,16 @@
+# This is a config include file. It sets up rsyslog so that the
+# diag system can successfully be used. Also, it generates a file
+# "rsyslogd.started" after rsyslogd is initialized. This config file
+# should be included in all tests that intend to use common code for
+# controlling the daemon.
+# NOTE: we assume that rsyslogd's current working directory is
+# ./tests (or the distcheck equivalent), in particlular that this
+# config file resides in the testsuites subdirectory.
+# rgerhards, 2009-05-27
+$ModLoad ../plugins/imdiag/.libs/imdiag
+$IMDiagServerRun 13500
+
+$template startupfile,"rsyslogd.started" # trick to use relative path names!
+:syslogtag, contains, "rsyslogd" ?startupfile
+
+$ErrorMessagesToStderr off
diff --git a/tests/testsuites/diskqueue.conf b/tests/testsuites/diskqueue.conf
new file mode 100644
index 00000000..a992c5a5
--- /dev/null
+++ b/tests/testsuites/diskqueue.conf
@@ -0,0 +1,16 @@
+# Test for queue disk mode (see .sh file for details)
+# rgerhards, 2009-04-17
+$IncludeConfig diag-common.conf
+
+$ModLoad ../plugins/imtcp/.libs/imtcp
+$MainMsgQueueTimeoutShutdown 10000
+$InputTCPServerRun 13514
+
+# set spool locations and switch queue to disk-only mode
+$WorkDirectory test-spool
+$MainMsgQueueFilename mainq
+$MainMsgQueueType disk
+
+$template outfmt,"%msg:F,58:2%\n"
+$template dynfile,"rsyslog.out.log" # trick to use relative path names!
+:msg, contains, "msgnum:" ?dynfile;outfmt
diff --git a/tests/testsuites/field1.conf b/tests/testsuites/field1.conf
new file mode 100644
index 00000000..1ff833dd
--- /dev/null
+++ b/tests/testsuites/field1.conf
@@ -0,0 +1,8 @@
+$ModLoad ../plugins/omstdout/.libs/omstdout
+$IncludeConfig nettest.input.conf # This picks the to be tested input from the test driver!
+
+$ErrorMessagesToStderr off
+
+# use a special format that we can easily parse in expect
+$template fmt,"%msg:F,32:2%\n"
+*.* :omstdout:;fmt
diff --git a/tests/testsuites/imtcp-multiport.conf b/tests/testsuites/imtcp-multiport.conf
new file mode 100644
index 00000000..ccdc15fb
--- /dev/null
+++ b/tests/testsuites/imtcp-multiport.conf
@@ -0,0 +1,13 @@
+# Test for queue disk mode (see .sh file for details)
+# rgerhards, 2009-05-22
+$IncludeConfig diag-common.conf
+
+$ModLoad ../plugins/imtcp/.libs/imtcp
+$MainMsgQueueTimeoutShutdown 10000
+$InputTCPServerRun 13514
+$InputTCPServerRun 13515
+$InputTCPServerRun 13516
+
+$template outfmt,"%msg:F,58:2%\n"
+$template dynfile,"rsyslog.out.log" # trick to use relative path names!
+:msg, contains, "msgnum:" ?dynfile;outfmt
diff --git a/tests/testsuites/inputname_imtcp.conf b/tests/testsuites/inputname_imtcp.conf
new file mode 100644
index 00000000..a25eab37
--- /dev/null
+++ b/tests/testsuites/inputname_imtcp.conf
@@ -0,0 +1,19 @@
+# This is a special case, thus we define the inputs ourselfs
+$ModLoad ../plugins/omstdout/.libs/omstdout
+
+$ModLoad ../plugins/imtcp/.libs/imtcp
+
+$InputTCPServerInputname 12514
+$InputTCPServerRun 12514
+
+$InputTCPServerInputname 12515
+$InputTCPServerRun 12515
+
+$InputTCPServerInputname 12516
+$InputTCPServerRun 12516
+
+$ErrorMessagesToStderr off
+
+# use a special format that we can easily parse in expect
+$template fmt,"%inputname%\n"
+*.* :omstdout:;fmt
diff --git a/tests/testsuites/manytcp.conf b/tests/testsuites/manytcp.conf
new file mode 100644
index 00000000..eb9db257
--- /dev/null
+++ b/tests/testsuites/manytcp.conf
@@ -0,0 +1,13 @@
+# Test for tcp "flood" testing
+# rgerhards, 2009-04-08
+$IncludeConfig diag-common.conf
+
+$ModLoad ../plugins/imtcp/.libs/imtcp
+$MainMsgQueueTimeoutShutdown 10000
+$MaxOpenFiles 2000
+$InputTCPMaxSessions 1100
+$InputTCPServerRun 13514
+
+$template outfmt,"%msg:F,58:2%\n"
+$template dynfile,"rsyslog.out.log" # trick to use relative path names!
+:msg, contains, "msgnum:" ?dynfile;outfmt
diff --git a/tests/testsuites/omod-if-array.conf b/tests/testsuites/omod-if-array.conf
index e6c05a52..d88db166 100644
--- a/tests/testsuites/omod-if-array.conf
+++ b/tests/testsuites/omod-if-array.conf
@@ -3,8 +3,7 @@
# the testbench, so we do not need to focus on that)
# rgerhards, 2009-04-03
$ModLoad ../plugins/omstdout/.libs/omstdout
-$ModLoad ../plugins/imudp/.libs/imudp
-$UDPServerRun 12514
+$IncludeConfig nettest.input.conf # This picks the to be tested input from the test driver!
$ActionOMStdoutArrayInterface on
$ErrorMessagesToStderr off
diff --git a/tests/testsuites/parse1.conf b/tests/testsuites/parse1.conf
index 0fb7d16d..947a05a8 100644
--- a/tests/testsuites/parse1.conf
+++ b/tests/testsuites/parse1.conf
@@ -1,6 +1,5 @@
$ModLoad ../plugins/omstdout/.libs/omstdout
-$ModLoad ../plugins/imudp/.libs/imudp
-$UDPServerRun 12514
+$IncludeConfig nettest.input.conf # This picks the to be tested input from the test driver!
$ErrorMessagesToStderr off
diff --git a/tests/testsuites/queue-persist.conf b/tests/testsuites/queue-persist.conf
new file mode 100644
index 00000000..8903042d
--- /dev/null
+++ b/tests/testsuites/queue-persist.conf
@@ -0,0 +1,21 @@
+# Test for persisting messages on shutdown
+# rgerhards, 2009-04-17
+$IncludeConfig diag-common.conf
+
+$ModLoad ../plugins/imtcp/.libs/imtcp
+$MainMsgQueueTimeoutShutdown 1
+$MainMsgQueueSaveOnShutdown on
+$InputTCPServerRun 13514
+
+$ModLoad ../plugins/omtesting/.libs/omtesting
+
+# set spool locations and switch queue to disk-only mode
+$WorkDirectory test-spool
+$MainMsgQueueFilename mainq
+$IncludeConfig work-queuemode.conf
+
+$template outfmt,"%msg:F,58:2%\n"
+$template dynfile,"rsyslog.out.log" # trick to use relative path names!
+:msg, contains, "msgnum:" ?dynfile;outfmt
+
+$IncludeConfig work-delay.conf