From 31e2d51a6a81976f8cfbb4144a42ac25e69fc55f Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 27 Jun 2008 10:15:55 +0000 Subject: [PATCH] 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 --- varnish-cache/bin/varnishtest/tests/README | 1 + .../bin/varnishtest/tests/v00000.vtc | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 varnish-cache/bin/varnishtest/tests/v00000.vtc 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 -- 2.39.5