summaryrefslogtreecommitdiffstats
path: root/tests/testsuites
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-03-19 15:14:09 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2010-03-19 15:14:09 +0100
commit091e4dc1b92db7e516d30df659a46b969274d6bf (patch)
tree0bcbe7a1cd7d6471bb6662e362b5021aded085e0 /tests/testsuites
parentab8af1c38df75fc5757e83a04862bf548a1e98a3 (diff)
downloadrsyslog-091e4dc1b92db7e516d30df659a46b969274d6bf.tar.gz
rsyslog-091e4dc1b92db7e516d30df659a46b969274d6bf.tar.xz
rsyslog-091e4dc1b92db7e516d30df659a46b969274d6bf.zip
added parser test cases to testbench
Diffstat (limited to 'tests/testsuites')
-rw-r--r--tests/testsuites/parse-nodate.conf14
-rw-r--r--tests/testsuites/samples.parse-nodate6
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/testsuites/parse-nodate.conf b/tests/testsuites/parse-nodate.conf
new file mode 100644
index 00000000..570638d9
--- /dev/null
+++ b/tests/testsuites/parse-nodate.conf
@@ -0,0 +1,14 @@
+# test is a test config that does not include the timestamp. This is necessary to
+# test some illformed messages that do not contain a date. In that case, the system's
+# current timestamp is used, and that of course is a bit hard to compare against
+# a fixed template. So the solution in this case is to use a format that does
+# not contain any timestamp. Maybe not optimal, but it works ;)
+# rgerhards, 2010-03-19
+$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
+$template fmt,"%PRI%,%syslogfacility-text%,%syslogseverity-text%,%hostname%,%programname%,%syslogtag%,%msg%\n"
+*.* :omstdout:;fmt
diff --git a/tests/testsuites/samples.parse-nodate b/tests/testsuites/samples.parse-nodate
new file mode 100644
index 00000000..7f16181c
--- /dev/null
+++ b/tests/testsuites/samples.parse-nodate
@@ -0,0 +1,6 @@
+<27>xapi: [error|xen3|15|Guest liveness monitor D:bca30ab3f1c1|master_connection] Connection to master died. I will continue to retry indefinitely (supressing future logging of this message)
+27,daemon,err,localhost,xapi,xapi:, [error|xen3|15|Guest liveness monitor D:bca30ab3f1c1|master_connection] Connection to master died. I will continue to retry indefinitely (supressing future logging of this message)
+# a message with just text (as permitted by rfc 3164)
+# it is questionable if the current sample result is really correct as of 3164!
+This is a message!
+13,user,notice,This,is,is, a message!