From 331fbd1c6a8811764eb79a9e00cd537c3fbaadee Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 5 Oct 2008 22:10:14 +0000 Subject: [PATCH] A bit more vcc_action.c coverage git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3256 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- .../bin/varnishtest/tests/v00018.vtc | 34 ++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/varnish-cache/bin/varnishtest/tests/v00018.vtc b/varnish-cache/bin/varnishtest/tests/v00018.vtc index d7025222..9f3dcbd0 100644 --- a/varnish-cache/bin/varnishtest/tests/v00018.vtc +++ b/varnish-cache/bin/varnishtest/tests/v00018.vtc @@ -8,6 +8,11 @@ varnish v1 -vcl { sub vcl_miss { restart rollback; } } +varnish v1 -badvcl { + backend b { .host = "127.0.0.1"; } + sub vcl_hit { restart 2 ; } +} + varnish v1 -vcl { backend b { .host = "127.0.0.1"; } sub vcl_fetch { error obj.status ; } @@ -20,6 +25,11 @@ varnish v1 -vcl { sub vcl_fetch { error obj.status req.url; } } +varnish v1 -badvcl { + backend b { .host = "127.0.0.1"; } + sub vcl_fetch { error 404 req.grace; } +} + varnish v1 -badvcl { backend b { .host = "127.0.0.1"; } sub vcl_miss { set server.port = 1000; } @@ -48,7 +58,17 @@ varnish v1 -badvcl { varnish v1 -badvcl { backend b { .host = "127.0.0.1"; } /* XXX: This should not really be an error */ - sub vcl_recv { set req.url = "foo" 2 "bar"; } + sub vcl_recv { set req.url = "foo" if "bar"; } +} + +varnish v1 -badvcl { + backend b { .host = "127.0.0.1"; } + sub vcl_hash { set req.hash += 1; } +} + +varnish v1 -badvcl { + backend b { .host = "127.0.0.1"; } + sub vcl_recv { set req.url = 1; } } varnish v1 -badvcl { @@ -78,12 +98,12 @@ varnish v1 -badvcl { varnish v1 -badvcl { backend b { .host = "127.0.0.1"; } - sub vcl_recv { purge_url (3); } + sub vcl_recv { purge_url (if); } } varnish v1 -badvcl { backend b { .host = "127.0.0.1"; } - sub vcl_recv { purge_hash (3); } + sub vcl_recv { purge_hash (if); } } varnish v1 -vcl { @@ -93,7 +113,7 @@ varnish v1 -vcl { varnish v1 -badvcl { backend b { .host = "127.0.0.1"; } - sub vcl_recv { panic 3; } + sub vcl_recv { panic if; } } varnish v1 -badvcl { @@ -101,3 +121,9 @@ varnish v1 -badvcl { sub vcl_recv { kluf ; } } + +varnish v1 -badvcl { + backend b { .host = "127.0.0.1"; } + sub vcl_error { synthetic if "foo"; } +} + -- 2.39.5