mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-13 07:10:42 +01:00
Also now permit interactivly running tests without explicitly setting $srcdir. This now works if we are inside ./tests and fails, as before, when we are in a different directory. Detected by shellcheck via CodeFactor.io
20 lines
726 B
Bash
Executable File
20 lines
726 B
Bash
Executable File
#!/bin/bash
|
|
. ${srcdir:=.}/diag.sh init
|
|
generate_conf
|
|
add_conf '
|
|
$ModLoad ../contrib/omtcl/.libs/omtcl
|
|
$template tcldict, "message \"%msg:::json%\" fromhost \"%HOSTNAME:::json%\" facility \"%syslogfacility-text%\" priority \"%syslogpriority-text%\" timereported \"%timereported:::date-rfc3339%\" timegenerated \"%timegenerated:::date-rfc3339%\" raw \"%rawmsg:::json%\" tag \"%syslogtag:::json%\""
|
|
'
|
|
add_conf "*.* :omtcl:$srcdir/omtcl.tcl,doAction;tcldict
|
|
"
|
|
startup
|
|
echo 'injectmsg litteral <167>Mar 1 01:00:00 172.20.245.8 tag hello world' | \
|
|
./diagtalker -p$IMDIAG_PORT || error_exit $?
|
|
echo doing shutdown
|
|
shutdown_when_empty
|
|
echo wait on shutdown
|
|
wait_shutdown
|
|
content_check 'HELLO WORLD'
|
|
cat $RSYSLOG_OUT_LOG
|
|
exit_test
|