r2711 - trunk/varnish-cache/bin/varnishtest

phk at projects.linpro.no phk at projects.linpro.no
Tue Jun 17 09:04:03 CEST 2008


Author: phk
Date: 2008-06-17 09:04:03 +0200 (Tue, 17 Jun 2008)
New Revision: 2711

Removed:
   trunk/varnish-cache/bin/varnishtest/vtc_vcl.c
Modified:
   trunk/varnish-cache/bin/varnishtest/Makefile.am
   trunk/varnish-cache/bin/varnishtest/t001.vtc
   trunk/varnish-cache/bin/varnishtest/vtc.c
Log:
We don't want a separate vcl command, it will be a subcommand of the
varnish command.



Modified: trunk/varnish-cache/bin/varnishtest/Makefile.am
===================================================================
--- trunk/varnish-cache/bin/varnishtest/Makefile.am	2008-06-16 22:31:27 UTC (rev 2710)
+++ trunk/varnish-cache/bin/varnishtest/Makefile.am	2008-06-17 07:04:03 UTC (rev 2711)
@@ -10,8 +10,7 @@
 		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 \

Modified: trunk/varnish-cache/bin/varnishtest/t001.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/t001.vtc	2008-06-16 22:31:27 UTC (rev 2710)
+++ trunk/varnish-cache/bin/varnishtest/t001.vtc	2008-06-17 07:04:03 UTC (rev 2711)
@@ -2,75 +2,37 @@
 #
 # $Id$
 
-server s1 -repeat 3 {
-	rxreq
-	expect url == "/"
-	txresponse -body "0123456789"
-}
+varnish v1 -arg -launch
 
-server s1 -start 
-
-client c1 {
-	txreq -url "/"
-	rxresponse
-	expect status == 200
-	expect length == 10
-}
-
-
-#######################################################################
-# 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
+server s1 -start 
 
-#######################################################################
-# Test trivial cache mode
-
-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

Modified: trunk/varnish-cache/bin/varnishtest/vtc.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc.c	2008-06-16 22:31:27 UTC (rev 2710)
+++ trunk/varnish-cache/bin/varnishtest/vtc.c	2008-06-17 07:04:03 UTC (rev 2711)
@@ -266,7 +266,6 @@
 static struct cmds cmds[] = {
 	{ "server", 	cmd_server },
 	{ "client", 	cmd_client },
-	{ "vcl", 	cmd_vcl },
 	{ "stats", 	cmd_stats },
 	{ "varnish", 	cmd_varnish },
 	{ "test", 	cmd_test },

Deleted: trunk/varnish-cache/bin/varnishtest/vtc_vcl.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_vcl.c	2008-06-16 22:31:27 UTC (rev 2710)
+++ trunk/varnish-cache/bin/varnishtest/vtc_vcl.c	2008-06-17 07:04:03 UTC (rev 2711)
@@ -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 <stdio.h>
-
-#include "vtc.h"
-
-void
-cmd_vcl(char **av, void *priv)
-{
-
-	cmd_dump(av, priv);
-}




More information about the varnish-commit mailing list