Commit 906b4234 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

We don't want a separate vcl command, it will be a subcommand of the

varnish command.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2711 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 1ca3e94f
......@@ -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 \
......
......@@ -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
......@@ -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 },
......
/*
* 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 <stdio.h>
#include "vtc.h"
void
cmd_vcl(char **av, void *priv)
{
cmd_dump(av, priv);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment