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

Test switching of VCLs



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2860 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 2f8c76f9
# $Id$
test "Test switching VCLs"
server s1 {
rxreq
expect req.url == "/foo"
txresp -body "foobar"
rxreq
expect req.url == "/foo"
txresp -body "foobar1"
} -start
varnish v1 -vcl+backend {
} -start
varnish v1 -vcl+backend {
sub vcl_recv {
pass;
}
}
varnish v1 -cli "vcl.list"
varnish v1 -cli "vcl.use vcl1"
client c1 {
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.content-length == 6
expect resp.http.x-varnish == "1001"
} -start
varnish v1 -cli "vcl.use vcl2"
client c2 {
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.content-length == 7
expect resp.http.x-varnish == "1002"
} -start
varnish v1 -cli "vcl.use vcl1"
client c3 {
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.content-length == 6
expect resp.http.x-varnish == "1003 1001"
} -start
varnish v1 -cli "vcl.show vcl2"
varnish v1 -cli "vcl.discard vcl2"
varnish v1 -cli "vcl.list"
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