summaryrefslogtreecommitdiffstats
path: root/tests/testsuites
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testsuites')
-rw-r--r--tests/testsuites/diag-common.conf16
-rw-r--r--tests/testsuites/diskqueue.conf7
-rw-r--r--tests/testsuites/imtcp-multiport.conf7
-rw-r--r--tests/testsuites/manytcp.conf7
-rw-r--r--tests/testsuites/memq-persist2.conf20
-rw-r--r--tests/testsuites/queue-persist.conf (renamed from tests/testsuites/memq-persist1.conf)12
6 files changed, 27 insertions, 42 deletions
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
index 017ee96d..d7f323bc 100644
--- a/tests/testsuites/diskqueue.conf
+++ b/tests/testsuites/diskqueue.conf
@@ -1,14 +1,11 @@
# Test for queue disk mode (see .sh file for details)
# rgerhards, 2009-04-17
+$IncludeConfig testsuites/diag-common.conf
+
$ModLoad ../plugins/imtcp/.libs/imtcp
$MainMsgQueueTimeoutShutdown 10000
$InputTCPServerRun 13514
-$ModLoad ../plugins/imdiag/.libs/imdiag
-$IMDiagServerRun 13500
-
-$ErrorMessagesToStderr off
-
# set spool locations and switch queue to disk-only mode
$WorkDirectory test-spool
$MainMsgQueueFilename mainq
diff --git a/tests/testsuites/imtcp-multiport.conf b/tests/testsuites/imtcp-multiport.conf
index ec059fe4..9146f6e0 100644
--- a/tests/testsuites/imtcp-multiport.conf
+++ b/tests/testsuites/imtcp-multiport.conf
@@ -1,16 +1,13 @@
# Test for queue disk mode (see .sh file for details)
# rgerhards, 2009-05-22
+$IncludeConfig testsuites/diag-common.conf
+
$ModLoad ../plugins/imtcp/.libs/imtcp
$MainMsgQueueTimeoutShutdown 10000
$InputTCPServerRun 13514
$InputTCPServerRun 13515
$InputTCPServerRun 13516
-$ModLoad ../plugins/imdiag/.libs/imdiag
-$IMDiagServerRun 13500
-
-$ErrorMessagesToStderr off
-
$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/manytcp.conf b/tests/testsuites/manytcp.conf
index 3867da46..772ec9ce 100644
--- a/tests/testsuites/manytcp.conf
+++ b/tests/testsuites/manytcp.conf
@@ -1,16 +1,13 @@
# Test for tcp "flood" testing
# rgerhards, 2009-04-08
+$IncludeConfig testsuites/diag-common.conf
+
$ModLoad ../plugins/imtcp/.libs/imtcp
$MainMsgQueueTimeoutShutdown 10000
$MaxOpenFiles 2000
$InputTCPMaxSessions 1100
$InputTCPServerRun 13514
-$ModLoad ../plugins/imdiag/.libs/imdiag
-$IMDiagServerRun 13500
-
-$ErrorMessagesToStderr off
-
$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/memq-persist2.conf b/tests/testsuites/memq-persist2.conf
deleted file mode 100644
index 23e29e2f..00000000
--- a/tests/testsuites/memq-persist2.conf
+++ /dev/null
@@ -1,20 +0,0 @@
-# Test for persisting messages to disk on shutdown
-# rgerhards, 2009-04-17
-$ModLoad ../plugins/imtcp/.libs/imtcp
-$MainMsgQueueTimeoutShutdown 10000
-$MainMsgQueueSaveOnShutdown on
-$InputTCPServerRun 13514
-
-$ModLoad ../plugins/imdiag/.libs/imdiag
-$IMDiagServerRun 13500
-
-$ErrorMessagesToStderr off
-
-# set spool locations and switch queue to disk-only mode
-$WorkDirectory test-spool
-$MainMsgQueueFilename mainq
-$MainMsgQueueType LinkedList
-
-$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/memq-persist1.conf b/tests/testsuites/queue-persist.conf
index 5240090f..80f8ba30 100644
--- a/tests/testsuites/memq-persist1.conf
+++ b/tests/testsuites/queue-persist.conf
@@ -1,13 +1,12 @@
-# Test for persisting messages to disk on shutdown
+# Test for persisting messages on shutdown
# rgerhards, 2009-04-17
+$IncludeConfig testsuites/diag-common.conf
+
$ModLoad ../plugins/imtcp/.libs/imtcp
$MainMsgQueueTimeoutShutdown 1
$MainMsgQueueSaveOnShutdown on
$InputTCPServerRun 13514
-$ModLoad ../plugins/imdiag/.libs/imdiag
-$IMDiagServerRun 13500
-
$ModLoad ../plugins/omtesting/.libs/omtesting
$ErrorMessagesToStderr off
@@ -15,11 +14,10 @@ $ErrorMessagesToStderr off
# set spool locations and switch queue to disk-only mode
$WorkDirectory test-spool
$MainMsgQueueFilename mainq
-$MainMsgQueueType LinkedList
+$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
-# delay execution so that a queue can build up:
-*.* :omtesting:sleep 0 1000
+$IncludeConfig work-delay.conf