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

phk at projects.linpro.no phk at projects.linpro.no
Tue Nov 11 20:07:30 CET 2008


Author: phk
Date: 2008-11-11 20:07:30 +0100 (Tue, 11 Nov 2008)
New Revision: 3387

Added:
   trunk/varnish-cache/bin/varnishtest/tests/r00365.vtc
Log:
Regression test case for ticket 365: restart in hit.



Added: trunk/varnish-cache/bin/varnishtest/tests/r00365.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/r00365.vtc	                        (rev 0)
+++ trunk/varnish-cache/bin/varnishtest/tests/r00365.vtc	2008-11-11 19:07:30 UTC (rev 3387)
@@ -0,0 +1,31 @@
+# $Id$
+
+test "Test restarts in vcl_hit"
+
+server s1 {
+	rxreq
+	expect req.url == "/foo"
+	txresp -status 200 -body "1"
+	rxreq
+	expect req.url == "/foo"
+	txresp -status 200 -body "22"
+} -start
+
+varnish v1 -vcl+backend { 
+	sub vcl_hit {
+		set obj.cacheable = false;
+		restart;
+	}
+} -start
+
+client c1 {
+	txreq -url "/foo"
+	rxresp
+	expect resp.status == 200
+	expect resp.bodylen == 1
+
+	txreq -url "/foo"
+	rxresp
+	expect resp.status == 200
+	expect resp.bodylen == 2
+} -run



More information about the varnish-commit mailing list