Commit edced643 authored by Geoff Simmons's avatar Geoff Simmons

add a test for option max_mem

parent f7d19eb5
# looks like -*- vcl -*-
varnishtest "max_mem option"
# Tests from re2 testing/re2_test.cc
varnish v1 -vcl {
import re2 from "${vmod_topbuild}/src/.libs/libvmod_re2.so";
backend b { .host = "${bad_ip}"; }
sub vcl_init {
new rep = re2.regex(".{512}x", max_mem=268435456);
}
sub vcl_recv {
return(synth(200));
}
sub vcl_synth {
if (rep.match("cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccx")) {
set resp.http.rep = "match";
}
}
} -start
client c1 {
txreq
rxresp
expect resp.http.rep == "match"
} -run
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