rsyslog/tests/pgsql-template.sh
Rainer Gerhards 2ba3c8ddde
testbench: modernize testbench plumbing
changes some of the test commands to use bash functions
includes some small bug fixes to tests where bugs were
previously not seen due to different plumbing.
2018-07-23 17:26:34 +02:00

23 lines
630 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
startup pgsql-template.conf
. $srcdir/diag.sh injectmsg 0 5000
shutdown_when_empty
wait_shutdown
# we actually put the message in the SysLogTag field, so we know it doesn't use the default
# template, like in pgsql-basic
psql -h localhost -U postgres -d syslogtest -f testsuites/pgsql-select-syslogtag.sql -t -A > rsyslog.out.log
seq_check 0 4999
echo cleaning up test database
psql -h localhost -U postgres -c 'DROP DATABASE IF EXISTS syslogtest;'
exit_test