testbench: add basic test for immark

This commit is contained in:
Rainer Gerhards 2019-08-20 09:11:16 +02:00
parent 8eb75c8676
commit 5f85577cd8
No known key found for this signature in database
GPG Key ID: 0CB6B2A8BE80B499
2 changed files with 21 additions and 0 deletions

View File

@ -139,6 +139,7 @@ endif # if ENABLE_ELASTICSEARCH_TESTS
if ENABLE_DEFAULT_TESTS
TESTS += \
immark.sh \
operatingstate-basic.sh \
operatingstate-empty.sh \
operatingstate-unclean.sh \
@ -1447,6 +1448,7 @@ EXTRA_DIST= \
dnscache-TTL-0-vg.sh \
smtradfile.sh \
smtradfile-vg.sh \
immark.sh \
operatingstate-basic.sh \
operatingstate-empty.sh \
operatingstate-unclean.sh \

19
tests/immark.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
# very basic check for immark module - nevertheless, there is not
# much more to test for...
# add 2019-08-20 by Rainer Gerhards, released under ASL 2.0
. ${srcdir:=.}/diag.sh init
generate_conf
add_conf '
module(load="../plugins/immark/.libs/immark" interval="1")
action(type="omfile" file="'$RSYSLOG_OUT_LOG'")
'
startup
printf 'sleeping a bit so we get mark messages...\n'
sleep 3 # this should be good even on slow machines - we need just one
shutdown_when_empty
wait_shutdown
content_check "rsyslogd: -- MARK --"
exit_test