# This file is part of vmod-binlog testsuite -*- autotest -*-
# Copyright (C) 2013 Sergey Poznyakoff
#
# Vmod-binlog is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# Vmod-binlog is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with vmod-binlog. If not, see .
AT_SETUP([log rotation])
AT_KEYWORDS([rotation])
AT_CHECK([
cwd=`pwd`
mkdir log
cat > test.vtc < test1.vtc
$VARNISHTEST test.vtc | sed 's/^#.*TEST test.vtc passed.*/OK/'
sleep 11
$VARNISHTEST test1.vtc | sed 's/^#.*TEST test1.vtc passed.*/OK/'
find log -name '*.log' | sort | while read file
do
echo "# file"
binlogcat -d $file
done
],
[0],
[OK
OK
# file
0 1 0
0 1 1
# file
0 2 0
0 2 1
])
AT_CLEANUP