Commit db72da16 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Better test coverage of VCC error detection code

parent dccd2814
......@@ -34,3 +34,10 @@ varnish v1 -badvcl {
set resp.http.who = std.author(jfk);
}
}
varnish v1 -badvcl {
import std from "${topbuild}/lib/libvmod_std/.libs/libvmod_std.so.1" ;
sub vcl_deliver {
set resp.http.who = std.random("foo", "bar");
}
}
......@@ -27,7 +27,7 @@ varnish v1 -vcl {
varnish v1 -badvcl {
sub vcl_recv {
if (req.restarts == req.url) {
if (!req.restarts != req.url) {
set req.http.foo = "foo" + 3;
}
......@@ -39,3 +39,31 @@ varnish v1 -badvcl {
set req.http.foo = vcl_recv;
}
}
varnish v1 -badvcl {
sub vcl_recv {
if (req.grace < 3s || req.grace) {
set req.http.foo = vcl_recv;
}
}
}
varnish v1 -badvcl {
sub vcl_recv {
if (req.grace < 3s && req.grace) {
set req.http.foo = vcl_recv;
}
}
}
varnish v1 -badvcl {
sub vcl_recv {
set req.http.foo = "bla" * "foo";
}
}
varnish v1 -badvcl {
sub vcl_fetch {
set req.http.foo = req.grace + beresp.status;
}
}
......@@ -38,3 +38,16 @@ client c1 {
expect resp.http.foo == 1100586419201.000
expect resp.http.bar == true
} -run
varnish v1 -badvcl {
sub vcl_recv {
if (storage.nowhere.free_space > 4 "X") {
}
}
}
varnish v1 -badvcl {
sub vcl_recv {
if (storage.nowhere.free_space > 4 X) {
}
}
}
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