From 16690f93c7030d0fcd2eba4bf1f8e853a5f47cff Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 7 Jul 2008 17:19:10 +0000 Subject: [PATCH] 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 --- .../bin/varnishtest/tests/v00002.vtc | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 varnish-cache/bin/varnishtest/tests/v00002.vtc 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; + } +} -- 2.39.5