summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-02-02 16:25:59 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-02-02 16:25:59 +0100
commit03cf2a5113e130e4f64b048dc4dc6d2c0aa1b3b2 (patch)
tree87f0ed3c66d159f4fd26a3501062000f98988838 /tests
parent312b13ca0c69212273d92483ab878d192f6e4ed8 (diff)
downloadrsyslog-03cf2a5113e130e4f64b048dc4dc6d2c0aa1b3b2.tar.gz
rsyslog-03cf2a5113e130e4f64b048dc4dc6d2c0aa1b3b2.tar.xz
rsyslog-03cf2a5113e130e4f64b048dc4dc6d2c0aa1b3b2.zip
ommysql: added support for v6 config format
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql-basic-cnf6.sh13
-rw-r--r--tests/testsuites/mysql-basic-cnf6.conf7
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/mysql-basic-cnf6.sh b/tests/mysql-basic-cnf6.sh
new file mode 100644
index 00000000..8990ba35
--- /dev/null
+++ b/tests/mysql-basic-cnf6.sh
@@ -0,0 +1,13 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[mysql-basic.sh\]: basic test for mysql-basic functionality
+source $srcdir/diag.sh init
+mysql --user=rsyslog --password=testbench < testsuites/mysql-truncate.sql
+source $srcdir/diag.sh startup mysql-basic-cnf6.conf
+source $srcdir/diag.sh injectmsg 0 5000
+source $srcdir/diag.sh shutdown-when-empty
+source $srcdir/diag.sh wait-shutdown
+# note "-s" is requried to suppress the select "field header"
+mysql -s --user=rsyslog --password=testbench < testsuites/mysql-select-msg.sql > rsyslog.out.log
+source $srcdir/diag.sh seq-check 0 4999
+source $srcdir/diag.sh exit
diff --git a/tests/testsuites/mysql-basic-cnf6.conf b/tests/testsuites/mysql-basic-cnf6.conf
new file mode 100644
index 00000000..bc95dc4f
--- /dev/null
+++ b/tests/testsuites/mysql-basic-cnf6.conf
@@ -0,0 +1,7 @@
+$IncludeConfig diag-common.conf
+
+$ModLoad ../plugins/ommysql/.libs/ommysql
+:msg, contains, "msgnum:" action(type="ommysql"
+ server="127.0.0.1"
+ db="Syslog
+ uid="rsyslog" pwd="testbench")