Reverting existing tests, adding new test for overriding maxbytes

This commit is contained in:
Barak Shechter 2016-10-11 11:06:26 -04:00
parent 737e085eb2
commit 992233d65a
10 changed files with 26 additions and 8 deletions

View File

@ -350,6 +350,7 @@ if ENABLE_ELASTICSEARCH_TESTS
TESTS += \
es-basic.sh \
es-basic-bulk.sh \
es-maxbytes-bulk.sh \
es-basic-errfile-empty.sh \
es-basic-errfile-popul.sh \
es-bulk-errfile-empty.sh \

13
tests/es-maxbytes-bulk.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash
# This file is part of the rsyslog project, released under ASL 2.0
echo ===============================================================================
echo \[es-maxbytes-bulk\]: test for elasticsearch functionality with maxbytes bulking
. $srcdir/diag.sh init
. $srcdir/diag.sh es-init
. $srcdir/diag.sh startup es-maxbytes-bulk.conf
. $srcdir/diag.sh injectmsg 0 10000
. $srcdir/diag.sh shutdown-when-empty
. $srcdir/diag.sh wait-shutdown
. $srcdir/diag.sh es-getdata 10000
. $srcdir/diag.sh seq-check 0 9999
. $srcdir/diag.sh exit

View File

@ -7,5 +7,4 @@ module(load="../plugins/omelasticsearch/.libs/omelasticsearch")
:msg, contains, "msgnum:" action(type="omelasticsearch"
template="tpl"
searchIndex="rsyslog_testbench"
bulkmode="on"
maxbytes="1k")
bulkmode="on")

View File

@ -8,5 +8,4 @@ module(load="../plugins/omelasticsearch/.libs/omelasticsearch")
template="tpl"
searchIndex="rsyslog_testbench"
bulkmode="on"
maxbytes="1k"
errorFile="./rsyslog.errorfile")

View File

@ -19,7 +19,6 @@ ruleset(name="foo") {
searchIndex="rsyslog_testbench"
searchType="test-type"
bulkmode="on"
maxbytes="1k"
errorFile="./rsyslog.errorfile")
}

View File

@ -19,7 +19,6 @@ ruleset(name="foo") {
searchIndex="rsyslog_testbench"
searchType="test-type"
bulkmode="on"
maxbytes="1k"
errorFile="./rsyslog.errorfile"
interleaved="on")
}

View File

@ -19,7 +19,6 @@ ruleset(name="foo") {
searchIndex="rsyslog_testbench"
searchType="test-type"
bulkmode="on"
maxbytes="1k"
errorFile="./rsyslog.errorfile"
erroronly="on"
interleaved="on")

View File

@ -19,7 +19,6 @@ ruleset(name="foo") {
searchIndex="rsyslog_testbench"
searchType="test-type"
bulkmode="on"
maxbytes="1k"
errorFile="./rsyslog.errorfile"
erroronly="on")
}

View File

@ -12,5 +12,4 @@ module(load="../plugins/omelasticsearch/.libs/omelasticsearch")
searchIndex="rsyslog_testbench"
searchType="test-type"
bulkmode="on"
maxbytes="1k"
errorFile="./rsyslog.errorfile")

View File

@ -0,0 +1,11 @@
$IncludeConfig diag-common.conf
template(name="tpl" type="string"
string="{\"msgnum\":\"%msg:F,58:2%\"}")
module(load="../plugins/omelasticsearch/.libs/omelasticsearch")
:msg, contains, "msgnum:" action(type="omelasticsearch"
template="tpl"
searchIndex="rsyslog_testbench"
bulkmode="on"
maxbytes="1k")