r2844 - trunk/varnish-cache/bin/varnishtest/tests
phk at projects.linpro.no
phk at projects.linpro.no
Fri Jun 27 12:15:55 CEST 2008
Author: phk
Date: 2008-06-27 12:15:55 +0200 (Fri, 27 Jun 2008)
New Revision: 2844
Added:
trunk/varnish-cache/bin/varnishtest/tests/v00000.vtc
Modified:
trunk/varnish-cache/bin/varnishtest/tests/README
Log:
Add testcase for VCL/VRT obj.ttl and obj.grace
Modified: trunk/varnish-cache/bin/varnishtest/tests/README
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/README 2008-06-26 22:55:25 UTC (rev 2843)
+++ trunk/varnish-cache/bin/varnishtest/tests/README 2008-06-27 10:15:55 UTC (rev 2844)
@@ -21,3 +21,4 @@
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
Added: trunk/varnish-cache/bin/varnishtest/tests/v00000.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/v00000.vtc (rev 0)
+++ trunk/varnish-cache/bin/varnishtest/tests/v00000.vtc 2008-06-27 10:15:55 UTC (rev 2844)
@@ -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
More information about the varnish-commit
mailing list