Add log rotation test with absolute file path

Add a test to the logfileconfig system test to test log file rotation
when using absolute file paths.
This commit is contained in:
Matthijs Mekking
2023-04-06 09:24:43 +02:00
parent 9fb9670ebc
commit d9b1df3b5d
3 changed files with 85 additions and 2 deletions

View File

@@ -236,6 +236,34 @@ retry_quiet 5 _found2 || ret=1
if [ "$ret" -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
n=$((n+1))
echo_i "testing absolute file path versions ($n)"
ret=0
copy_setports ns1/named.abspathconf.in ns1/named.conf
try=0
while test $try -lt 12
do
touch $TMPDIR/example.log.$try
try=`expr $try + 1`
done
rndc_reconfig ns1 10.53.0.1 > rndc.out.test$n
_found2() (
$DIG version.bind txt ch @10.53.0.1 -p ${PORT} > dig.out.test$n
grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
try=1
while test $try -lt 12
do
[ -f $TMPDIR/example.log.$try ] && return 1
try=`expr $try + 1`
done
set -- $TMPDIR/example.log.*
[ "$#" -eq 1 ] || return 1
)
retry_quiet 5 _found2 || ret=1
if [ "$ret" -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
n=$((n+1))
echo_i "testing unlimited versions ($n)"
ret=0