From: phk Date: Tue, 13 Jan 2009 14:18:54 +0000 (+0000) Subject: Add testcase for cli:purge X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19a025851864de4382d08044c32e051976cbab6b;p=varnish Add testcase for cli:purge git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3511 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishtest/tests/c00021.vtc b/varnish-cache/bin/varnishtest/tests/c00021.vtc new file mode 100644 index 00000000..a222c87f --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/c00021.vtc @@ -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