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

A simple ACL testcase



git-svn-id: http://www.varnish-cache.org/svn/trunk@2812 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent be5952c2
# $Id$
test "Test simple ACL"
server s1 {
rxreq
expect req.url == "/"
txresp -hdr "Content-Length: 5" -body "1111\n"
rxreq
expect req.url == "foo"
txresp -hdr "Content-Length: 5" -body "2222\n"
} -start
varnish v1 -vcl+backend {
acl acl1 {
"127.0.0.1";
}
sub vcl_recv {
if (client.ip ~ acl1) {
set req.url = "/";
}
}
} -start
client c1 {
txreq -url "foo"
rxresp
expect resp.status == 200
}
client c1 -run
varnish v1 -vcl+backend {
acl acl1 {
"!127.0.0.1";
}
sub vcl_recv {
if (client.ip ~ acl1) {
set req.url = "/";
}
}
}
client c1 -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