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
33 lines
951 B
Bash
Executable File
33 lines
951 B
Bash
Executable File
#!/bin/bash
|
|
# add 2017-09-21 by Pascal Withopf, released under ASL 2.0
|
|
. ${srcdir:=.}/diag.sh init
|
|
generate_conf
|
|
add_conf '
|
|
global(
|
|
defaultNetstreamDriver="gtls"
|
|
defaultNetstreamDriverKeyFile="tls-certs/nokey.pem"
|
|
defaultNetstreamDriverCertFile="tls-certs/cert.pem"
|
|
defaultNetstreamDriverCaFile="tls-certs/ca.pem"
|
|
)
|
|
module(load="../plugins/imtcp/.libs/imtcp" StreamDriver.Name="gtls" StreamDriver.Mode="1" StreamDriver.AuthMode="anon")
|
|
input(type="imtcp" port="'$TCPFLOOD_PORT'")
|
|
|
|
template(name="outfmt" type="string" string="%msg:F,58:2%\n")
|
|
|
|
action(type="omfile" template="outfmt" file=`echo $RSYSLOG_OUT_LOG`)
|
|
|
|
'
|
|
startup
|
|
shutdown_when_empty
|
|
wait_shutdown
|
|
|
|
grep "defaultnetstreamdriverkeyfile.*tls-certs/nokey.pem" $RSYSLOG_OUT_LOG > /dev/null
|
|
if [ $? -ne 0 ]; then
|
|
echo
|
|
echo "FAIL: expected error message from missing input file not found. $RSYSLOG_OUT_LOG is:"
|
|
cat $RSYSLOG_OUT_LOG
|
|
error_exit 1
|
|
fi
|
|
|
|
exit_test
|