blob: 4dc19630938d449502f59d648472f5a6db6e6d88 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#!/bin/bash
# test for lookup-table with HUP based reloading disabled
# added 2015-09-30 by singh.janmejay
# This file is part of the rsyslog project, released under ASL 2.0
. ${srcdir:=.}/diag.sh init
generate_conf
add_conf '
lookup_table(name="xlate" file="'$RSYSLOG_DYNNAME'.xlate.lkp_tbl" reloadOnHUP="off")
template(name="outfmt" type="string" string="- %msg% %$.lkp%\n")
set $.lkp = lookup("xlate", $msg);
action(type="omfile" file=`echo $RSYSLOG_OUT_LOG` template="outfmt")
'
cp -f $srcdir/testsuites/xlate.lkp_tbl $RSYSLOG_DYNNAME.xlate.lkp_tbl
startup
injectmsg 0 3
wait_queueempty
content_check "msgnum:00000000: foo_old"
content_check "msgnum:00000001: bar_old"
assert_content_missing "baz"
cp -f $srcdir/testsuites/xlate_more.lkp_tbl $RSYSLOG_DYNNAME.xlate.lkp_tbl
issue_HUP
await_lookup_table_reload
injectmsg 0 3
echo doing shutdown
shutdown_when_empty
echo wait on shutdown
wait_shutdown
assert_content_missing "foo_new"
assert_content_missing "bar_new"
assert_content_missing "baz"
exit_test
|