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

phk at projects.linpro.no phk at projects.linpro.no
Sat Feb 28 23:06:40 CET 2009


Author: phk
Date: 2009-02-28 23:06:39 +0100 (Sat, 28 Feb 2009)
New Revision: 3846

Modified:
   trunk/varnish-cache/bin/varnishtest/tests/v00011.vtc
Log:
Update this test to not rely of a known dynamic of varnishd



Modified: trunk/varnish-cache/bin/varnishtest/tests/v00011.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/v00011.vtc	2009-02-28 21:56:49 UTC (rev 3845)
+++ trunk/varnish-cache/bin/varnishtest/tests/v00011.vtc	2009-02-28 22:06:39 UTC (rev 3846)
@@ -11,9 +11,11 @@
 } -start
 
 varnish v1 -vcl+backend { 
-
-	sub vcl_fetch {
-		purge_url("^/$");
+	sub vcl_recv {
+		if (req.request == "PURGE") {
+			purge_url("^/$");
+			error 209 "foo";
+		}
 	}
 
 } -start
@@ -22,9 +24,18 @@
 	txreq 
 	rxresp
 	expect resp.http.X-Varnish == "1001"
+} -run
 
-	txreq
+client c1 {
+	txreq -req "PURGE"
 	rxresp
 	expect resp.http.X-Varnish == "1002"
+	expect resp.status == 209
+} -run
 
-} -start
+client c1 {
+	txreq
+	rxresp
+	expect resp.http.X-Varnish == "1003"
+
+} -run



More information about the varnish-commit mailing list