r2918 - trunk/varnish-cache/bin/varnishtest/tests
phk at projects.linpro.no
phk at projects.linpro.no
Thu Jul 10 20:08:42 CEST 2008
Author: phk
Date: 2008-07-10 20:08:42 +0200 (Thu, 10 Jul 2008)
New Revision: 2918
Added:
trunk/varnish-cache/bin/varnishtest/tests/v00007.vtc
Log:
Add a testcase for the random director doing actual work
Added: trunk/varnish-cache/bin/varnishtest/tests/v00007.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/v00007.vtc (rev 0)
+++ trunk/varnish-cache/bin/varnishtest/tests/v00007.vtc 2008-07-10 18:08:42 UTC (rev 2918)
@@ -0,0 +1,29 @@
+# $Id$
+
+test "Test random director"
+
+server s1 {
+ rxreq
+ txresp -body "foo1"
+ rxreq
+ txresp -body "bar1"
+} -start
+
+varnish v1 -vcl+backend {
+ director foo random {
+ { .backend = s1; .weight = 1; }
+ { .backend = s1; .weight = 1; }
+ }
+
+ sub vcl_recv {
+ set req.backend = foo;
+ }
+} -start
+
+client c1 {
+ timeout 10
+ txreq -url "/foo"
+ rxresp
+ txreq -url "/bar"
+ rxresp
+} -run
More information about the varnish-commit
mailing list