]> err.no Git - varnish/commitdiff
Add a test-case for VCL purging
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 31 Jul 2008 14:59:06 +0000 (14:59 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 31 Jul 2008 14:59:06 +0000 (14:59 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3046 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishtest/tests/c00017.vtc [new file with mode: 0644]

diff --git a/varnish-cache/bin/varnishtest/tests/c00017.vtc b/varnish-cache/bin/varnishtest/tests/c00017.vtc
new file mode 100644 (file)
index 0000000..03b03a4
--- /dev/null
@@ -0,0 +1,30 @@
+# $Id: c00016.vtc 3012 2008-07-24 12:22:35Z des $
+
+test "Test vcl purging"
+
+server s1 {
+       rxreq
+       txresp -body "foo"
+
+       rxreq
+       txresp -body "foo"
+} -start
+
+varnish v1 -vcl+backend { 
+
+       sub vcl_fetch {
+               purge_url("^/$");
+       }
+
+} -start
+
+client c1 {
+       txreq 
+       rxresp
+       expect resp.http.X-Varnish == "1001"
+
+       txreq
+       rxresp
+       expect resp.http.X-Varnish == "1002"
+
+} -start