From 9acd24e4dc486848725d82af359feca0b318f697 Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 10 Oct 2008 19:55:12 +0000 Subject: [PATCH] More coverage for vcc_backend.c git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3280 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- .../bin/varnishtest/tests/v00002.vtc | 76 ++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-) diff --git a/varnish-cache/bin/varnishtest/tests/v00002.vtc b/varnish-cache/bin/varnishtest/tests/v00002.vtc index cffc7656..1557d49b 100644 --- a/varnish-cache/bin/varnishtest/tests/v00002.vtc +++ b/varnish-cache/bin/varnishtest/tests/v00002.vtc @@ -1,6 +1,6 @@ # $Id$ -test "VCL: test syntax/semantic checks on backend decls." +test "VCL: test syntax/semantic checks on backend decls. (vcc_backend.c)" # Missing backend varnish v1 -badvcl { @@ -111,3 +111,77 @@ varnish v1 -badvcl { varnish v1 -badvcl { director r1 anarchy { .host = "127.0.0.1"; } } + +varnish v1 -badvcl { + /* too many IP numbers */ + backend b1 { .host = "cnn.com"; } +} + +varnish v1 -vcl { + backend b1 { .host = "////"; } +} + +varnish v1 -vcl { + backend b1 { .host = "127.0.0.1"; .port = "70000"; } +} + +varnish v1 -badvcl { + backend b1 { + .host = "127.0.0.1"; + .foobar = "foo"; + } +} + +varnish v1 -badvcl { + backend b1 { + .host = "127.0.0.1"; + .probe = { + .ice = "vanilla"; + } + } +} + +varnish v1 -badvcl { + backend b1 { + .host = "127.0.0.1"; + .probe = { .window = 8; } + } +} + +varnish v1 -badvcl { + backend b1 { + .host = "127.0.0.1"; + .probe = { .threshold = 65; } + } +} + +varnish v1 -vcl { + backend b1 { + .host = "127.0.0.1"; + .probe = { .threshold = 64; } + } +} + +varnish v1 -badvcl { + backend b1 { + .host = "127.0.0.1"; + .probe = { .threshold = 32; .window = 65; } + } +} + + +varnish v1 -vcl { + backend b1 { + .host = "127.0.0.1"; + .probe = { .threshold = 32; .window = 64; } + } +} + + +varnish v1 -badvcl { + backend b1 { + .host = "127.0.0.1"; + .probe = { .threshold = 32; .window = 31; } + } +} + -- 2.39.5