From: phk Date: Fri, 27 Jun 2008 10:15:55 +0000 (+0000) Subject: Add testcase for VCL/VRT obj.ttl and obj.grace X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31e2d51a6a81976f8cfbb4144a42ac25e69fc55f;p=varnish Add testcase for VCL/VRT obj.ttl and obj.grace git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2844 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishtest/tests/README b/varnish-cache/bin/varnishtest/tests/README index 0e6a110f..8b2ec157 100644 --- a/varnish-cache/bin/varnishtest/tests/README +++ b/varnish-cache/bin/varnishtest/tests/README @@ -21,3 +21,4 @@ Naming scheme id ~ [e] --> ESI tests id ~ [r] --> Regression tests, same number as ticket id ~ [s] --> Slow tests, expiry, grace etc. + id ~ [v] --> VCL tests: execute VRT functions diff --git a/varnish-cache/bin/varnishtest/tests/v00000.vtc b/varnish-cache/bin/varnishtest/tests/v00000.vtc new file mode 100644 index 00000000..463d1bdb --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/v00000.vtc @@ -0,0 +1,30 @@ +# $Id$ + +test "VCL/VRT: obj.ttl and obj.grace" + + +server s1 { + rxreq + txresp -hdr "Connection: close" -body "012345\n" +} + +server s1 -start + +varnish v1 -vcl+backend { + sub vcl_fetch { + set obj.ttl += 1 m; + set obj.grace += 1 m; + } +} -start + +client c1 { + txreq -url "/" + rxresp + expect resp.status == 200 +} + +client c1 -run + +server s1 -wait + +varnish v1 -stop