rsyslog/tests/omrelp_errmsg_no_connect.sh
Rainer Gerhards afd8118223
bugfix omrelp: emit error messages on suspension
The module did not emit error messages. Actually, it would have done
if librelp would emit them (callback is in place), but librelp does
not do. We expect to fix this at the librelp level as well. But to
make this work with all versions of librelp, we have added basic
error messages to omrelp. They may not be totally easy to understand,
but at least provide the librelp error code (that's the best we can
do in this situation).

see also https://github.com/rsyslog/librelp/issues/130
closes https://github.com/rsyslog/rsyslog/issues/3294
2018-11-14 11:57:56 +01:00

18 lines
511 B
Bash
Executable File

#!/bin/bash
# add 2018-11-14 by Rainer Gerhards, released under ASL 2.0
. ${srcdir:=.}/diag.sh init
generate_conf
# note: we "abuse" TCPFLOOD_PORT a bit as we already have it assigned
# the core fact is that nobody is listening on it.
add_conf '
module(load="../plugins/omrelp/.libs/omrelp")
action(type="omrelp" target="127.0.0.1" port="'$TCPFLOOD_PORT'")
action(type="omfile" file="'$RSYSLOG_OUT_LOG'")
'
startup
shutdown_when_empty
wait_shutdown
content_check "could not connect to remote server"
exit_test