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

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


Author: phk
Date: 2008-06-27 14:48:12 +0200 (Fri, 27 Jun 2008)
New Revision: 2854

Added:
   trunk/varnish-cache/bin/varnishtest/tests/c00010.vtc
Log:
Test pass from vcl_hit{}



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




More information about the varnish-commit mailing list