]> err.no Git - varnish/commitdiff
Add a testcase for the random director doing actual work
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 10 Jul 2008 18:08:42 +0000 (18:08 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 10 Jul 2008 18:08:42 +0000 (18:08 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2918 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishtest/tests/v00007.vtc [new file with mode: 0644]

diff --git a/varnish-cache/bin/varnishtest/tests/v00007.vtc b/varnish-cache/bin/varnishtest/tests/v00007.vtc
new file mode 100644 (file)
index 0000000..436ab09
--- /dev/null
@@ -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