From: phk Date: Fri, 10 Oct 2008 19:55:12 +0000 (+0000) Subject: More coverage for vcc_backend.c X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9acd24e4dc486848725d82af359feca0b318f697;p=varnish More coverage for vcc_backend.c git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3280 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- 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; } + } +} +