Commit 1c18366e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make this test-case Jail compatible

parent e7233471
varnishtest "Test VMOD ACLs"
varnishtest "Test VMOD ACLs (jail-compatible)"
varnish v1 -vcl {
import debug;
server s1 {
rxreq
txresp
} -start
backend dummy {
.host = "${bad_ip}";
}
varnish v1 -vcl+backend {
import debug;
acl loopback {
"127"/24;
}
acl local {
// We assume c1 and s1 comes from same address
"${s1_addr}"/24;
}
sub vcl_init {
if (!debug.match_acl(loopback, "127.0.0.127")) {
debug.init_fail();
......@@ -18,8 +24,8 @@ varnish v1 -vcl {
}
sub vcl_recv {
if (debug.match_acl(loopback, client.ip)) {
return (synth(200));
if (debug.match_acl(local, client.ip)) {
return (hash);
}
return (synth(500));
}
......
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