mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-17 01:00:40 +01:00
testbench: add tests for mmjsonparse
This commit is contained in:
parent
0b141c01dd
commit
ac08e97083
@ -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
13
tests/mmjsonparse_cim.sh
Executable 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
13
tests/mmjsonparse_simple.sh
Executable 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
|
||||
11
tests/testsuites/mmjsonparse_cim.conf
Normal file
11
tests/testsuites/mmjsonparse_cim.conf
Normal 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")
|
||||
}
|
||||
11
tests/testsuites/mmjsonparse_simple.conf
Normal file
11
tests/testsuites/mmjsonparse_simple.conf
Normal 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")
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user