[master] 8457ac6 Add some tests from the 4.0 branch
Federico G. Schwindt
fgsch at lodoss.net
Mon Mar 16 17:28:34 CET 2015
commit 8457ac6ed4241742e813928cf02112f5b5fb7f36
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Mon Mar 16 11:38:32 2015 +0000
Add some tests from the 4.0 branch
diff --git a/bin/varnishtest/tests/r01637.vtc b/bin/varnishtest/tests/r01637.vtc
new file mode 100644
index 0000000..1c7489c
--- /dev/null
+++ b/bin/varnishtest/tests/r01637.vtc
@@ -0,0 +1,57 @@
+varnishtest "do_esi + do_gzip + out of storage: #1637"
+
+server s1 {
+ # First consume (almost) all of the storage
+ rxreq
+ expect req.url == /url1
+ txresp -bodylen 260000
+
+ rxreq
+ expect req.url == /url2
+ txresp -bodylen 260000
+
+ rxreq
+ expect req.url == /url3
+ txresp -bodylen 260000
+
+ rxreq
+ expect req.url == /url4
+ txresp -bodylen 260000
+
+ rxreq
+ expect req.url == /url5
+ txresp -bodylen 9000
+} -start
+
+varnish v1 -arg "-smalloc,1M" -arg "-p nuke_limit=0 -p gzip_level=0" \
+ -vcl+backend {
+ sub vcl_backend_response {
+ if (bereq.url == "/url5") {
+ set beresp.do_esi = true;
+ set beresp.do_gzip = true;
+ }
+ }
+} -start
+
+
+client c1 {
+ txreq -url /url1
+ rxresp
+ expect resp.status == 200
+
+ txreq -url /url2
+ rxresp
+ expect resp.status == 200
+
+ txreq -url /url3
+ rxresp
+ expect resp.status == 200
+
+ txreq -url /url4
+ rxresp
+ expect resp.status == 200
+
+ txreq -url /url5
+ rxresp
+ expect resp.status == 503
+} -run
diff --git a/bin/varnishtest/tests/r01660.vtc b/bin/varnishtest/tests/r01660.vtc
new file mode 100644
index 0000000..1ce133c
--- /dev/null
+++ b/bin/varnishtest/tests/r01660.vtc
@@ -0,0 +1,18 @@
+varnishtest "#1660: range and synth"
+
+server s1 {
+ rxreq
+ txresp
+} -start
+
+varnish v1 -vcl+backend {
+ sub vcl_recv {
+ return (synth(200, "OK"));
+ }
+} -start
+
+client c1 {
+ txreq -hdr "Range: 0-1"
+ rxresp
+ expect resp.status == 200
+} -run
diff --git a/bin/varnishtest/tests/r01691.vtc b/bin/varnishtest/tests/r01691.vtc
new file mode 100644
index 0000000..71b6076
--- /dev/null
+++ b/bin/varnishtest/tests/r01691.vtc
@@ -0,0 +1,21 @@
+varnishtest "Test bogus Content-Length header"
+
+server s1 {
+ rxreq
+ txresp -nolen -hdr "Content-Length: bogus"
+} -start
+
+varnish v1 -vcl+backend {
+
+} -start
+
+logexpect l1 -v v1 {
+ expect * 1002 Error "Body cannot be fetched"
+} -start
+
+client c1 {
+ txreq
+ rxresp
+} -run
+
+logexpect l1 -wait
More information about the varnish-commit
mailing list