testbench add test for mangle_qi

see also https://github.com/rsyslog/rsyslog/issues/3072
This commit is contained in:
Jan Gerhards 2018-11-13 18:24:44 +01:00
parent ac652d1fba
commit 51d2b5732c
2 changed files with 16 additions and 0 deletions

View File

@ -60,6 +60,7 @@ TESTS += \
empty-hostname.sh \
hostname-getaddrinfo-fail.sh \
msleep_usage_output.sh \
mangle_qi_usage_output.sh \
test_id_usage_output.sh \
prop-programname.sh \
prop-programname-with-slashes.sh \
@ -1239,6 +1240,7 @@ EXTRA_DIST= \
mmutf8fix_no_error.sh \
tcpflood_wrong_option_output.sh \
msleep_usage_output.sh \
mangle_qi_usage_output.sh \
test_id_usage_output.sh \
mmanon_with_debug.sh \
mmanon_random_32_ipv4.sh \

14
tests/mangle_qi_usage_output.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
# add 2018-11-13 by Jan Gerhards, released under ASL 2.0
. ${srcdir:=.}/diag.sh init
./mangle_qi &> $RSYSLOG_DYNNAME.output
grep -q -- "-q option MUST be specified" $RSYSLOG_DYNNAME.output
if [ ! $? -eq 0 ]; then
echo "invalid response generated"
error_exit 1
fi;
exit_test