Commit 8ba2941b authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add a test-case for r01644, even though I cannot reproduce the

problem, it may be a platform thing, in which case Jenkins should
go Technicrome after this commit...3...2...1...
parent 3ba899d4
varnishtest "test access to cache_param from vmod"
server s1 {
rxreq
txresp
} -start
varnish v1 -vcl+backend {
import ${vmod_debug};
sub vcl_deliver {
set resp.http.foo = debug.vre_limit();
}
} -start
varnish v1 -cliok "param.set pcre_match_limit 100"
client c1 {
txreq
rxresp
expect resp.http.foo == 100
} -run
varnish v1 -cliok "param.set pcre_match_limit 200"
client c1 {
txreq
rxresp
expect resp.http.foo == 200
} -run
......@@ -91,3 +91,5 @@ Encrypt the HTTP header with quad-ROT13 encryption,
(this is approx 33% better than triple-DES).
$Function STRING argtest(STRING one, REAL two=2, STRING three="3")
$Function INT vre_limit()
......@@ -168,3 +168,10 @@ vmod_argtest(VRT_CTX, VCL_STRING one, VCL_REAL two, VCL_STRING three)
bprintf(buf, "%s %g %s", one, two, three);
return WS_Copy(ctx->ws, buf, -1);
}
VCL_INT
vmod_vre_limit(VRT_CTX)
{
(void)ctx;
return (cache_param->vre_limits.match);
}
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