mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-17 22:10:41 +01:00
The PostgreSQL output module was woefully out-of-date the following list is changes made to update the module to current Rsyslog standards. - allow for v6 configuration syntax - configurable ports - support transactional interface - push db connection into workers (libpq is threadsafe) - enable module testing on travis - ensure configuration syntax backwards compatibility - formatting around postgres core templating - use new test conventions - add new configuration syntax test - add valgrind tests for new and old syntax - add threading tests - add action queue long running tests - add action queue valgrind test
29 lines
803 B
Bash
Executable File
29 lines
803 B
Bash
Executable File
#!/bin/bash
|
|
# This file is part of the rsyslog project, released under GPLv3
|
|
|
|
. $srcdir/diag.sh init
|
|
|
|
psql -h localhost -U postgres -f testsuites/pgsql-basic.sql
|
|
|
|
. $srcdir/diag.sh generate-conf
|
|
. $srcdir/diag.sh add-conf '
|
|
module(load="../plugins/ompgsql/.libs/ompgsql")
|
|
if $msg contains "msgnum" then {
|
|
action(type="ompgsql" server="127.0.0.1"
|
|
db="syslogtest" user="postgres" pass="testbench")
|
|
}'
|
|
. $srcdir/diag.sh startup
|
|
. $srcdir/diag.sh injectmsg 0 5000
|
|
. $srcdir/diag.sh shutdown-when-empty
|
|
. $srcdir/diag.sh wait-shutdown
|
|
|
|
|
|
psql -h localhost -U postgres -d syslogtest -f testsuites/pgsql-select-msg.sql -t -A > rsyslog.out.log
|
|
|
|
. $srcdir/diag.sh seq-check 0 4999
|
|
|
|
echo cleaning up test database
|
|
psql -h localhost -U postgres -c 'DROP DATABASE IF EXISTS syslogtest;'
|
|
|
|
. $srcdir/diag.sh exit
|