[master] fcc229e1e Improve test coverage for VSL binary file reads.

Geoff Simmons geoff at uplex.de
Sat Feb 23 17:49:06 UTC 2019


commit fcc229e1ea4855c8129019e791d7b32425a5cf39
Author: Geoff Simmons <geoff at uplex.de>
Date:   Sat Feb 23 18:48:20 2019 +0100

    Improve test coverage for VSL binary file reads.

diff --git a/bin/varnishtest/tests/u00006.vtc b/bin/varnishtest/tests/u00006.vtc
index ad1b9d3f1..aef71d393 100644
--- a/bin/varnishtest/tests/u00006.vtc
+++ b/bin/varnishtest/tests/u00006.vtc
@@ -154,3 +154,13 @@ shell -match {^\*[ ]+<< BeReq\s+>>[ ]+1005[ ]+
 -[ ]+BereqURL[ ]+/bar
 $} \
 	"varnishlog -r ${tmpdir}/vlog.bin -b -C -I BAR"
+
+shell -match {^\*[ ]+<< BeReq\s+>>[ ]+1005[ ]+} \
+	"cat ${tmpdir}/vlog.bin | varnishlog -r - -b -C -I BAR"
+
+shell "rm -f ${tmpdir}/foo"
+shell -err -expect "Cannot open ${tmpdir}/foo: " \
+	"varnishlog -r ${tmpdir}/foo"
+shell "echo foobar > ${tmpdir}/foo"
+shell -err -expect "Not a VSL file: ${tmpdir}/foo" \
+	"varnishlog -r ${tmpdir}/foo"


More information about the varnish-commit mailing list