testbench: add tests for mmjsonparse

This commit is contained in:
Rainer Gerhards 2014-07-15 15:05:29 +02:00
parent 0b141c01dd
commit ac08e97083
5 changed files with 54 additions and 0 deletions

View File

@ -81,6 +81,8 @@ TESTS += \
rs_optimizer_pri.sh \
cee_simple.sh \
cee_diskqueue.sh \
mmjsonparse_simple.sh \
mmjsonparse_cim.sh \
incltest.sh \
incltest_dir.sh \
incltest_dir_wildcard.sh \
@ -343,6 +345,10 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \
testsuites/cee_simple.conf \
cee_diskqueue.sh \
testsuites/cee_diskqueue.conf \
mmjsonparse_simple.sh \
testsuites/mmjsonparse_simple.conf \
mmjsonparse_cim.sh \
testsuites/mmjsonparse_cim.conf \
incltest.sh \
testsuites/incltest.conf \
incltest_dir.sh \

13
tests/mmjsonparse_cim.sh Executable file
View File

@ -0,0 +1,13 @@
# added 2014-07-15 by rgerhards
# This file is part of the rsyslog project, released under ASL 2.0
echo ===============================================================================
echo \[mmjsonparse_cim.sh\]: basic test for mmjsonparse module with "cim" cookie
source $srcdir/diag.sh init
source $srcdir/diag.sh startup mmjsonparse_cim.conf
./tcpflood -m 5000 -j "@cim: "
echo doing shutdown
source $srcdir/diag.sh shutdown-when-empty
echo wait on shutdown
source $srcdir/diag.sh wait-shutdown
source $srcdir/diag.sh seq-check 0 4999
source $srcdir/diag.sh exit

13
tests/mmjsonparse_simple.sh Executable file
View File

@ -0,0 +1,13 @@
# added 2014-07-15 by rgerhards
# This file is part of the rsyslog project, released under ASL 2.0
echo ===============================================================================
echo \[mmjsonparse_simple.sh\]: basic test for mmjsonparse module with defaults
source $srcdir/diag.sh init
source $srcdir/diag.sh startup mmjsonparse_simple.conf
./tcpflood -m 5000 -j "@cee: "
echo doing shutdown
source $srcdir/diag.sh shutdown-when-empty
echo wait on shutdown
source $srcdir/diag.sh wait-shutdown
source $srcdir/diag.sh seq-check 0 4999
source $srcdir/diag.sh exit

View File

@ -0,0 +1,11 @@
$IncludeConfig diag-common.conf
template(name="outfmt" type="string" string="%$!cim!msgnum%\n")
module(load="../plugins/mmjsonparse/.libs/mmjsonparse")
module(load="../plugins/imptcp/.libs/imptcp")
input(type="imptcp" port="13514")
action(type="mmjsonparse" cookie="@cim:" container="!cim")
if $parsesuccess == "OK" then {
action(type="omfile" file="./rsyslog.out.log" template="outfmt")
}

View File

@ -0,0 +1,11 @@
$IncludeConfig diag-common.conf
template(name="outfmt" type="string" string="%$!msgnum%\n")
module(load="../plugins/mmjsonparse/.libs/mmjsonparse")
module(load="../plugins/imptcp/.libs/imptcp")
input(type="imptcp" port="13514")
action(type="mmjsonparse")
if $parsesuccess == "OK" then {
action(type="omfile" file="./rsyslog.out.log" template="outfmt")
}