diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 16:28:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 16:28:20 +0000 |
commit | dcc721a95bef6f0d8e6d8775b8efe33e5aecd562 (patch) | |
tree | 66a2774cd0ee294d019efd71d2544c70f42b2842 /tests/ruleset-direct-queue.sh | |
parent | Initial commit. (diff) | |
download | rsyslog-dcc721a95bef6f0d8e6d8775b8efe33e5aecd562.tar.xz rsyslog-dcc721a95bef6f0d8e6d8775b8efe33e5aecd562.zip |
Adding upstream version 8.2402.0.upstream/8.2402.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ruleset-direct-queue.sh')
-rwxr-xr-x | tests/ruleset-direct-queue.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/ruleset-direct-queue.sh b/tests/ruleset-direct-queue.sh new file mode 100755 index 0000000..f0b0e95 --- /dev/null +++ b/tests/ruleset-direct-queue.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# check that ruleset is called synchronously when queue.type="direct" is +# specified in ruleset. +# added 2021-09-17 by rgerhards. Released under ASL 2.0 +. ${srcdir:=.}/diag.sh init +generate_conf +export STATSFILE="$RSYSLOG_DYNNAME.stats" +add_conf ' +template(name="outfmt" type="string" string="%msg%,%$.msg%\n") + +ruleset(name="rs1" queue.type="direct") { + set $.msg = "TEST"; +} + + +if $msg contains "msgnum:" then { + set $.msg = $msg; + call rs1 + action(type="omfile" name="main-action" file="'$RSYSLOG_OUT_LOG'" template="outfmt") +} +' +startup +injectmsg 0 1 +shutdown_when_empty +wait_shutdown +content_check "msgnum:00000000:,TEST" +exit_test |