mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-17 07:00:42 +01:00
modified test for invalid container name
test does now check for error messages
This commit is contained in:
parent
5ce74d0610
commit
d44f5bfe88
@ -647,6 +647,10 @@ if ENABLE_MMJSONPARSE
|
||||
TESTS += \
|
||||
mmjsonparse-w-o-cookie.sh \
|
||||
mmjsonparse-w-o-cookie-multi-spaces.sh
|
||||
if ENABLE_IMPSTATS
|
||||
TESTS += \
|
||||
mmjsonparse-invalid-containerName.sh
|
||||
endif
|
||||
if ENABLE_IMPTCP
|
||||
TESTS += \
|
||||
mmjsonparse_simple.sh \
|
||||
@ -1178,6 +1182,7 @@ EXTRA_DIST= \
|
||||
mmjsonparse-w-o-cookie.sh \
|
||||
mmjsonparse-w-o-cookie-multi-spaces.sh \
|
||||
mmjsonparse_simple.sh \
|
||||
mmjsonparse-invalid-containerName.sh \
|
||||
imptcp-oversize-message-display.sh \
|
||||
imptcp-msg-truncation-on-number.sh \
|
||||
imptcp-msg-truncation-on-number2.sh \
|
||||
|
||||
@ -3,20 +3,30 @@
|
||||
. $srcdir/diag.sh init
|
||||
. $srcdir/diag.sh generate-conf
|
||||
. $srcdir/diag.sh add-conf '
|
||||
module(load="../plugins/impstats/.libs/impstats" interval="300" resetCounters="on" format="cee" ruleset="fooruleset" log.syslog="on")
|
||||
module(load="../plugins/impstats/.libs/impstats" interval="300"
|
||||
resetCounters="on" format="cee" ruleset="fooruleset" log.syslog="on")
|
||||
module(load="../plugins/mmjsonparse/.libs/mmjsonparse")
|
||||
|
||||
action(name="fooname" type="mmjsonparse" container="foobar")
|
||||
|
||||
action(type="omfile" file="rsyslog.out.log")
|
||||
'
|
||||
. $srcdir/diag.sh startup
|
||||
. $srcdir/diag.sh shutdown-when-empty
|
||||
. $srcdir/diag.sh wait-shutdown
|
||||
|
||||
echo '' | cmp - rsyslog.out.log
|
||||
if [ ! $? -eq 0 ]; then
|
||||
echo "invalid response generated, rsyslog.out.log is:"
|
||||
cat rsyslog.out.log
|
||||
. $srcdir/diag.sh error-exit 1
|
||||
fi;
|
||||
grep "mmjsonparse: invalid container name 'foobar', name must start with" rsyslog.out.log > /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "FAIL: expected error message not found. rsyslog.out.log is:"
|
||||
cat rsyslog.out.log
|
||||
. $srcdir/diag.sh error-exit 1
|
||||
fi
|
||||
|
||||
grep "impstats: ruleset 'fooruleset' not found - using default ruleset instead" rsyslog.out.log > /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "FAIL: expected error message not found. rsyslog.out.log is:"
|
||||
cat rsyslog.out.log
|
||||
. $srcdir/diag.sh error-exit 1
|
||||
fi
|
||||
|
||||
. $srcdir/diag.sh exit
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user