]> err.no Git - varnish/commitdiff
Add testcase for creation and destruction of backends
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 7 Jul 2008 22:15:12 +0000 (22:15 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 7 Jul 2008 22:15:12 +0000 (22:15 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2896 d4fa192b-c00b-0410-8231-f00ffab90ce4

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

diff --git a/varnish-cache/bin/varnishtest/tests/v00004.vtc b/varnish-cache/bin/varnishtest/tests/v00004.vtc
new file mode 100644 (file)
index 0000000..4e4f7bf
--- /dev/null
@@ -0,0 +1,67 @@
+# $Id$
+
+test "VCL: test creation/destruction of backends"
+
+varnish v1 -vcl {
+       backend b1 {
+               .host = "127.0.0.1";
+       }
+} -start
+
+varnish v1 -cli vcl.list
+varnish v1 -cli debug.backend
+
+varnish v1 -vcl {
+       backend b1 {
+               .host = "127.0.0.1";
+       }
+}
+
+varnish v1 -cli vcl.list
+varnish v1 -cli debug.backend
+
+varnish v1 -vcl {
+       backend b2 {
+               .host = "127.0.0.1";
+       }
+}
+
+varnish v1 -cli vcl.list
+varnish v1 -cli debug.backend
+
+varnish v1 -cli "vcl.discard vcl1"
+
+varnish v1 -cli vcl.list
+varnish v1 -cli debug.backend
+
+varnish v1 -cli "vcl.discard vcl2"
+
+varnish v1 -cli vcl.list
+varnish v1 -cli debug.backend
+
+varnish v1 -vcl {
+       backend b2 {
+               .host = "127.0.0.1";
+       }
+       director r1 random {
+               { .backend = { .host = "127.0.0.1"; } .weight = 1; }
+               { .backend = b2 ; .weight = 1; }
+       }
+       sub vcl_recv {
+               set req.backend = r1;
+       }
+}
+
+varnish v1 -cli vcl.list
+varnish v1 -cli debug.backend
+
+varnish v1 -cli "vcl.use vcl3"
+
+varnish v1 -cli vcl.list
+varnish v1 -cli debug.backend
+
+varnish v1 -cli "vcl.discard vcl4"
+
+varnish v1 -cli vcl.list
+varnish v1 -cli debug.backend
+