~ubuntu-branches/ubuntu/lucid/varnish/lucid-updates

« back to all changes in this revision

Viewing changes to bin/varnishtest/tests/v00011.vtc

  • Committer: Bazaar Package Importer
  • Author(s): Stig Sandbeck Mathisen
  • Date: 2010-03-24 13:26:08 UTC
  • mfrom: (0.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100324132608-4uzkavctn26bdwyi
Tags: 2.1.0-1
* New upstream version
* Fix small error in man/vcl.7so

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: v00011.vtc 3300 2008-10-15 09:52:15Z tfheen $
 
1
# $Id: v00011.vtc 3846 2009-02-28 22:06:39Z phk $
2
2
 
3
3
test "Test vcl purging"
4
4
 
11
11
} -start
12
12
 
13
13
varnish v1 -vcl+backend { 
14
 
 
15
 
        sub vcl_fetch {
16
 
                purge_url("^/$");
 
14
        sub vcl_recv {
 
15
                if (req.request == "PURGE") {
 
16
                        purge_url("^/$");
 
17
                        error 209 "foo";
 
18
                }
17
19
        }
18
20
 
19
21
} -start
22
24
        txreq 
23
25
        rxresp
24
26
        expect resp.http.X-Varnish == "1001"
25
 
 
 
27
} -run
 
28
 
 
29
client c1 {
 
30
        txreq -req "PURGE"
 
31
        rxresp
 
32
        expect resp.http.X-Varnish == "1002"
 
33
        expect resp.status == 209
 
34
} -run
 
35
 
 
36
client c1 {
26
37
        txreq
27
38
        rxresp
28
 
        expect resp.http.X-Varnish == "1002"
 
39
        expect resp.http.X-Varnish == "1003"
29
40
 
30
 
} -start
 
41
} -run