r2855 - trunk/varnish-cache/bin/varnishtest/tests

phk at projects.linpro.no phk at projects.linpro.no
Fri Jun 27 14:51:48 CEST 2008


Author: phk
Date: 2008-06-27 14:51:47 +0200 (Fri, 27 Jun 2008)
New Revision: 2855

Added:
   trunk/varnish-cache/bin/varnishtest/tests/c00011.vtc
Log:
Test "hit for pass" (pass from vcl_fetch)



Added: trunk/varnish-cache/bin/varnishtest/tests/c00011.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00011.vtc	                        (rev 0)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00011.vtc	2008-06-27 12:51:47 UTC (rev 2855)
@@ -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




More information about the varnish-commit mailing list