]> err.no Git - varnish/commitdiff
Update this test to not rely of a known dynamic of varnishd
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 28 Feb 2009 22:06:39 +0000 (22:06 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 28 Feb 2009 22:06:39 +0000 (22:06 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3846 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishtest/tests/v00011.vtc

index b58e73e5a2de913db22853a1632f09e0e679629a..ee649c5008a4af959b73436cb47df6bdb84e223e 100644 (file)
@@ -11,9 +11,11 @@ server s1 {
 } -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 @@ client c1 {
        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