[master] ba20559 Add a coverage test for -sfile
Poul-Henning Kamp
phk at varnish-cache.org
Fri Nov 8 21:18:44 CET 2013
commit ba20559c952a011bb322a93c26e81e8590c2dd4e
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Fri Nov 8 20:18:25 2013 +0000
Add a coverage test for -sfile
diff --git a/bin/varnishtest/tests/s00003.vtc b/bin/varnishtest/tests/s00003.vtc
new file mode 100644
index 0000000..c9a5e9f
--- /dev/null
+++ b/bin/varnishtest/tests/s00003.vtc
@@ -0,0 +1,41 @@
+varnishtest "Coverage test for -sfile"
+
+server s1 {
+ rxreq
+ txresp -nolen -hdr "Transfer-encoding: chunked"
+ chunkedlen 65536
+ chunkedlen 65536
+ chunkedlen 65536
+ chunkedlen 65536
+ chunkedlen 1
+ chunkedlen 0
+
+ rxreq
+ txresp -nolen -hdr "Transfer-encoding: chunked"
+ chunkedlen 262
+ chunkedlen 0
+} -start
+
+varnish v1 \
+ -arg "-sfile,${tmpdir}/_.file,10m" \
+ -vcl+backend {
+ sub vcl_backend_response {
+ set beresp.do_stream = false;
+ set beresp.ttl = 0.1s;
+ set beresp.grace = 0.1s;
+ set beresp.keep = 0.1s;
+ }
+ } \
+ -start
+
+client c1 {
+ txreq
+ rxresp
+ expect resp.bodylen == 262145
+
+ delay 2
+
+ txreq
+ rxresp
+ expect resp.bodylen == 262
+} -run
More information about the varnish-commit
mailing list