From 737d5c3347b67a4fba764dfc429b94658c837c64 Mon Sep 17 00:00:00 2001 From: phk Date: Thu, 10 Jul 2008 18:08:42 +0000 Subject: [PATCH] Add a testcase for the random director doing actual work git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2918 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- .../bin/varnishtest/tests/v00007.vtc | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 varnish-cache/bin/varnishtest/tests/v00007.vtc diff --git a/varnish-cache/bin/varnishtest/tests/v00007.vtc b/varnish-cache/bin/varnishtest/tests/v00007.vtc new file mode 100644 index 00000000..436ab099 --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/v00007.vtc @@ -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 -- 2.39.5