diff options
Diffstat (limited to 'debian/tests/logrotate')
-rwxr-xr-x | debian/tests/logrotate | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/debian/tests/logrotate b/debian/tests/logrotate new file mode 100755 index 0000000..5d8b97c --- /dev/null +++ b/debian/tests/logrotate @@ -0,0 +1,19 @@ +#!/bin/sh + +set -ex + +OUTPUT="${AUTOPKGTEST_ARTIFACTS:-.}/logrotate.txt" + +LOG="/var/log/corosync/corosync.log" + +logrotate --force --log "$OUTPUT" /etc/logrotate.d/corosync +cat "$OUTPUT" +grep -q "rotating log $LOG," "$OUTPUT" + +[ -e "$LOG" ] +! [ -s "$LOG" ] + +# Reload config to generate logs +corosync-cfgtool -R + +grep -q 'Config reload requested' "$LOG" |