From: phk Date: Mon, 7 Jul 2008 17:19:10 +0000 (+0000) Subject: Add test-case or syntax-checks of backend decls. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16690f93c7030d0fcd2eba4bf1f8e853a5f47cff;p=varnish Add test-case or syntax-checks of backend decls. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2880 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishtest/tests/v00002.vtc b/varnish-cache/bin/varnishtest/tests/v00002.vtc new file mode 100644 index 00000000..f6821af1 --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/v00002.vtc @@ -0,0 +1,36 @@ +# $Id$ + +test "VCL: test syntax/semantic checks on backend decls." + +# Missing .host +varnish v1 -badvcl { + backend b1 { + .port = "http"; + } +} + +# Too many .host +varnish v1 -badvcl { + backend b1 { + .host = "foo"; + .host = "bar"; + } +} + +# Too many .port +varnish v1 -badvcl { + backend b1 { + .host = "foo"; + .port = "http"; + .port = "https"; + } +} + +# Too many .connect_timeout +varnish v1 -badvcl { + backend b1 { + .host = "foo"; + .connect_timeout = 1m; + .connect_timeout = 1m; + } +}