]> err.no Git - varnish/commitdiff
Test "hit for pass" (pass from vcl_fetch)
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 27 Jun 2008 12:51:47 +0000 (12:51 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 27 Jun 2008 12:51:47 +0000 (12:51 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2855 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishtest/tests/c00011.vtc [new file with mode: 0644]

diff --git a/varnish-cache/bin/varnishtest/tests/c00011.vtc b/varnish-cache/bin/varnishtest/tests/c00011.vtc
new file mode 100644 (file)
index 0000000..1c081dc
--- /dev/null
@@ -0,0 +1,33 @@
+# $Id$
+
+test "Test hit for pass (pass from fetch)"
+
+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_fetch {
+               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