From: phk Date: Tue, 17 Jun 2008 07:04:03 +0000 (+0000) Subject: We don't want a separate vcl command, it will be a subcommand of the X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=593fb9e00f1c42049289b2b9f63e3f791d4ff680;p=varnish We don't want a separate vcl command, it will be a subcommand of the varnish command. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2711 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishtest/Makefile.am b/varnish-cache/bin/varnishtest/Makefile.am index 1fc15f48..07e45581 100644 --- a/varnish-cache/bin/varnishtest/Makefile.am +++ b/varnish-cache/bin/varnishtest/Makefile.am @@ -10,8 +10,7 @@ varnishtest_SOURCES = \ vtc_http.c \ vtc_server.c \ vtc_stats.c \ - vtc_varnish.c \ - vtc_vcl.c + vtc_varnish.c varnishtest_LDADD = \ $(top_builddir)/lib/libvarnish/libvarnish.la \ diff --git a/varnish-cache/bin/varnishtest/t001.vtc b/varnish-cache/bin/varnishtest/t001.vtc index d6b973aa..347aa98a 100644 --- a/varnish-cache/bin/varnishtest/t001.vtc +++ b/varnish-cache/bin/varnishtest/t001.vtc @@ -2,75 +2,37 @@ # # $Id$ -server s1 -repeat 3 { - rxreq - expect url == "/" - txresponse -body "0123456789" -} - -server s1 -start - -client c1 { - txreq -url "/" - rxresponse - expect status == 200 - expect length == 10 -} +varnish v1 -arg -launch - -####################################################################### -# Test trivial pipe mode - -vcl { - $s1; - sub vcl_recv { - set req.backend = s1; +varnish v1 -vcl { + backend s1 { + .host = "localhost"; + .port = "9080"; + } + vcl_recv { pipe; } } -client c1 -run - -####################################################################### -# Test trivial pass mode - -vcl { - $s1; - sub vcl_recv { - set req.backend = s1; - pass; - } +server s1 -repeat 1 { + rxreq + txresp \ + -hdr "Connection: close" \ + -hdr "Test1: foobar" \ + -hdr "Test2: foobar" \ + -body "012345\n" } -client c1 -run - -####################################################################### -# Test trivial cache mode +server s1 -start -vcl { - $s1; - sub vcl_recv { - set req.backend = s1; - } +client c1 { + txreq -url "/" + rxresp + expect resp.status == 200 } client c1 -run server s1 -wait -####################################################################### -# And see that it stuck in cache - -client c1 -run - -varnish stop - -stats { - expect client_conn == 4 - expect client_req == 4 - expect cache_hit == 1 - expect cache_miss == 1 - expect s_pipe == 1 - expect s_pass == 1 - expect s_fetch == 2 -} +varnish v1 -stop diff --git a/varnish-cache/bin/varnishtest/vtc.c b/varnish-cache/bin/varnishtest/vtc.c index aa96b610..113ca179 100644 --- a/varnish-cache/bin/varnishtest/vtc.c +++ b/varnish-cache/bin/varnishtest/vtc.c @@ -266,7 +266,6 @@ cmd_dump(char **av, void *priv) static struct cmds cmds[] = { { "server", cmd_server }, { "client", cmd_client }, - { "vcl", cmd_vcl }, { "stats", cmd_stats }, { "varnish", cmd_varnish }, { "test", cmd_test }, diff --git a/varnish-cache/bin/varnishtest/vtc_vcl.c b/varnish-cache/bin/varnishtest/vtc_vcl.c deleted file mode 100644 index e9e5e3da..00000000 --- a/varnish-cache/bin/varnishtest/vtc_vcl.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2006-2008 Linpro AS - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $Id$ - */ - - -#include - -#include "vtc.h" - -void -cmd_vcl(char **av, void *priv) -{ - - cmd_dump(av, priv); -}