Commit 1779d902 authored by Geoff Simmons's avatar Geoff Simmons

add more tests for the -g option

parent 76be6c01
# varnishevent test configuration for raw transactions
monitor.interval = 0
cformat=
rformat=%t %{%F-%T.%i}t %{tag:Begin}x
......@@ -4,8 +4,7 @@ echo
echo "TEST: $0"
echo "... testing standard VSL args"
echo "... -g grouping"
echo "... -g vxid"
# For grouping, use the larger test log that has some backend transactions,
# since the two groupings have the effect of exchanging the order of some
# output lines (no difference with the smaller log).
......@@ -17,6 +16,7 @@ if [ "$CKSUM" != '3589078266 20793576' ]; then
exit 1
fi
echo "... -g request"
CKSUM=$( ../varnishevent -g request -r sw-doc.log -f varnishevent.conf | cksum)
if [ "$CKSUM" != '2107709581 20793576' ]; then
......@@ -24,6 +24,24 @@ if [ "$CKSUM" != '2107709581 20793576' ]; then
exit 1
fi
echo "... -g raw"
# Timestamps for raw grouping are always the time at which the tx was read,
# even for binary file reads. So we check against the last three columns.
CKSUM=$( ../varnishevent -g raw -r varnish-doc.log -f raw.conf | awk '{print $(NF-2), $(NF-1), $NF}' | cksum)
if [ "$CKSUM" != '2652535054 3311' ]; then
echo "ERROR: -g raw unexpected cksum: $CKSUM"
exit 1
fi
echo '... -g session'
../varnishevent -g session
if [ "$?" != "1" ]; then
echo "ERROR: -g session did not exit with failure as expected"
exit 1
fi
exit 0
echo "... -m tag:regex"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment