]> err.no Git - varnish/commitdiff
Test banning a hash
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 26 Jun 2008 11:36:46 +0000 (11:36 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 26 Jun 2008 11:36:46 +0000 (11:36 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2830 d4fa192b-c00b-0410-8231-f00ffab90ce4

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

diff --git a/varnish-cache/bin/varnishtest/tests/c00007.vtc b/varnish-cache/bin/varnishtest/tests/c00007.vtc
new file mode 100644 (file)
index 0000000..f45b639
--- /dev/null
@@ -0,0 +1,34 @@
+# $Id$
+
+test "Test banning a hash"
+
+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 -cli "purge.hash foo"
+
+client c1 {
+       txreq -url "/foo"
+       rxresp
+       expect resp.status == 200
+       expect resp.http.content-length == 6
+}
+
+client c1 -run