From: phk Date: Fri, 27 Jun 2008 12:48:12 +0000 (+0000) Subject: Test pass from vcl_hit{} X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6450fe72bc12388cc72a4e494af382898d47b176;p=varnish Test pass from vcl_hit{} git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2854 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishtest/tests/c00010.vtc b/varnish-cache/bin/varnishtest/tests/c00010.vtc new file mode 100644 index 00000000..5cd1e61f --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/c00010.vtc @@ -0,0 +1,33 @@ +# $Id$ + +test "Test pass from hit" + +server s1 { + rxreq + expect req.url == "/foo" + txresp -body foobar + rxreq + expect req.url == "/foo" + txresp -body foobar1 +} -start + +varnish v1 -vcl+backend { + sub vcl_hit { + pass; + } +} -start + +client c1 { + txreq -url "/foo" + rxresp + expect resp.status == 200 + expect resp.http.content-length == 6 + expect resp.http.x-varnish == "1001" + txreq -url "/foo" + rxresp + expect resp.status == 200 + expect resp.http.content-length == 7 + expect resp.http.x-varnish == "1002" +} + +client c1 -run