r3700 - branches/2.0/varnish-cache/bin/varnishtest/tests

tfheen at projects.linpro.no tfheen at projects.linpro.no
Mon Feb 9 13:28:16 CET 2009


Author: tfheen
Date: 2009-02-09 13:28:16 +0100 (Mon, 09 Feb 2009)
New Revision: 3700

Added:
   branches/2.0/varnish-cache/bin/varnishtest/tests/c00021.vtc
Log:
Merge r3511: Add testcase for cli:purge



Copied: branches/2.0/varnish-cache/bin/varnishtest/tests/c00021.vtc (from rev 3511, trunk/varnish-cache/bin/varnishtest/tests/c00021.vtc)
===================================================================
--- branches/2.0/varnish-cache/bin/varnishtest/tests/c00021.vtc	                        (rev 0)
+++ branches/2.0/varnish-cache/bin/varnishtest/tests/c00021.vtc	2009-02-09 12:28:16 UTC (rev 3700)
@@ -0,0 +1,41 @@
+# $Id: c00006.vtc 2906 2008-07-08 10:29:07Z phk $
+
+test "Test banning a url with cli:purge"
+
+server s1 {
+	rxreq
+	expect req.url == "/foo"
+	txresp -body "1111\n"
+	rxreq
+	expect req.url == "/foo"
+	txresp -body "11111\n"
+} -start
+
+varnish v1 -vcl+backend { } -start
+
+client c1 {
+	txreq -url "/foo"
+	rxresp
+	expect resp.status == 200
+	expect resp.http.content-length == 5
+} 
+
+client c1 -run
+
+varnish v1 -clierr 104 "purge"
+varnish v1 -clierr 104 "purge foo"
+varnish v1 -clierr 104 "purge foo bar"
+varnish v1 -clierr 106 "purge a b c && a"
+varnish v1 -clierr 106 "purge a b c && a b"
+varnish v1 -clierr 106 "purge a b c || a b c"
+varnish v1 -cli "purge req.url ~ foo"
+# varnish v1 -cli "purge req.url ~ foo && req.url ~ bar"
+
+client c1 {
+	txreq -url "/foo"
+	rxresp
+	expect resp.status == 200
+	expect resp.http.content-length == 6
+}
+
+client c1 -run



More information about the varnish-commit mailing list