]> err.no Git - varnish/commitdiff
Regression test case for ticket 365: restart in hit.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 11 Nov 2008 19:07:30 +0000 (19:07 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 11 Nov 2008 19:07:30 +0000 (19:07 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3387 d4fa192b-c00b-0410-8231-f00ffab90ce4

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

diff --git a/varnish-cache/bin/varnishtest/tests/r00365.vtc b/varnish-cache/bin/varnishtest/tests/r00365.vtc
new file mode 100644 (file)
index 0000000..fed9a47
--- /dev/null
@@ -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