]> err.no Git - varnish/commitdiff
Add test-case or syntax-checks of backend decls.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 7 Jul 2008 17:19:10 +0000 (17:19 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 7 Jul 2008 17:19:10 +0000 (17:19 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2880 d4fa192b-c00b-0410-8231-f00ffab90ce4

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

diff --git a/varnish-cache/bin/varnishtest/tests/v00002.vtc b/varnish-cache/bin/varnishtest/tests/v00002.vtc
new file mode 100644 (file)
index 0000000..f6821af
--- /dev/null
@@ -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;
+       }
+}