From: phk Date: Mon, 7 Jul 2008 22:15:12 +0000 (+0000) Subject: Add testcase for creation and destruction of backends X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=921f5dc62119426e6c854e85b2404c6a9aae75af;p=varnish Add testcase for creation and destruction of backends git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2896 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishtest/tests/v00004.vtc b/varnish-cache/bin/varnishtest/tests/v00004.vtc new file mode 100644 index 00000000..4e4f7bf8 --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/v00004.vtc @@ -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 +