#
# $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
+++ /dev/null
-/*
- * 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);
-}