r3018 - trunk/varnish-cache/bin/varnishtest/tests

phk at projects.linpro.no phk at projects.linpro.no
Fri Jul 25 00:09:26 CEST 2008


Author: phk
Date: 2008-07-25 00:09:25 +0200 (Fri, 25 Jul 2008)
New Revision: 3018

Added:
   trunk/varnish-cache/bin/varnishtest/tests/e00009.vtc
Modified:
   trunk/varnish-cache/bin/varnishtest/tests/e00003.vtc
   trunk/varnish-cache/bin/varnishtest/tests/e00004.vtc
   trunk/varnish-cache/bin/varnishtest/tests/e00005.vtc
   trunk/varnish-cache/bin/varnishtest/tests/e00006.vtc
   trunk/varnish-cache/bin/varnishtest/tests/e00007.vtc
   trunk/varnish-cache/bin/varnishtest/tests/e00008.vtc
Log:
Make the ESI testcases start with an XML tag to satsify our new
non-XML detector logic.

Add a testcase to see if it works and that we can override it.



Modified: trunk/varnish-cache/bin/varnishtest/tests/e00003.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/e00003.vtc	2008-07-24 21:55:56 UTC (rev 3017)
+++ trunk/varnish-cache/bin/varnishtest/tests/e00003.vtc	2008-07-24 22:09:25 UTC (rev 3018)
@@ -6,6 +6,7 @@
 server s1 {
 	rxreq 
 	txresp -body {
+		<html>
 		Before include
 		<esi:include src="/body"/>
 		After include

Modified: trunk/varnish-cache/bin/varnishtest/tests/e00004.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/e00004.vtc	2008-07-24 21:55:56 UTC (rev 3017)
+++ trunk/varnish-cache/bin/varnishtest/tests/e00004.vtc	2008-07-24 22:09:25 UTC (rev 3018)
@@ -6,6 +6,7 @@
 server s1 {
 	rxreq 
 	txresp -body {
+		<html>
 		Before include
 		<!--esi <esi:include src="/body"/> -->
 		After include

Modified: trunk/varnish-cache/bin/varnishtest/tests/e00005.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/e00005.vtc	2008-07-24 21:55:56 UTC (rev 3017)
+++ trunk/varnish-cache/bin/varnishtest/tests/e00005.vtc	2008-07-24 22:09:25 UTC (rev 3018)
@@ -7,6 +7,7 @@
 	rxreq 
 	expect req.url == "/foo/bar"
 	txresp -body {
+		<html>
 		Before include
 		<!--esi <esi:include src="body"/> -->
 		After include

Modified: trunk/varnish-cache/bin/varnishtest/tests/e00006.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/e00006.vtc	2008-07-24 21:55:56 UTC (rev 3017)
+++ trunk/varnish-cache/bin/varnishtest/tests/e00006.vtc	2008-07-24 22:09:25 UTC (rev 3018)
@@ -7,6 +7,7 @@
 	rxreq 
 	expect req.url == "/foo/bar"
 	txresp -body {
+		<html>
 		Before include
 		<!--esi <esi:include src="http://bozz/body"/> -->
 		After include

Modified: trunk/varnish-cache/bin/varnishtest/tests/e00007.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/e00007.vtc	2008-07-24 21:55:56 UTC (rev 3017)
+++ trunk/varnish-cache/bin/varnishtest/tests/e00007.vtc	2008-07-24 22:09:25 UTC (rev 3018)
@@ -8,6 +8,7 @@
 	expect req.url == "/foo/bar"
 	txresp -hdr "Connection: close"
 	send {
+		<html>
 		This is before the test
 		<![CDATA[fooooooobar]]>
 		<esi:remove>

Modified: trunk/varnish-cache/bin/varnishtest/tests/e00008.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/e00008.vtc	2008-07-24 21:55:56 UTC (rev 3017)
+++ trunk/varnish-cache/bin/varnishtest/tests/e00008.vtc	2008-07-24 22:09:25 UTC (rev 3018)
@@ -5,6 +5,7 @@
 server s1 {
 	rxreq 
 	txresp -body {
+		<html>
 		Before include
 		<!--esi <esi:include src="/body"/> -->
 		After include

Added: trunk/varnish-cache/bin/varnishtest/tests/e00009.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/e00009.vtc	                        (rev 0)
+++ trunk/varnish-cache/bin/varnishtest/tests/e00009.vtc	2008-07-24 22:09:25 UTC (rev 3018)
@@ -0,0 +1,44 @@
+# $Id: e00008.vtc 3012 2008-07-24 12:22:35Z des $
+
+test "ESI binary detector"
+
+server s1 {
+	rxreq 
+	txresp -body {
+		Before include
+		<esi:remove>
+			bar
+		</esi:remove>
+		<esi:include
+	}
+	rxreq 
+	txresp -body {
+		Before include
+		<esi:remove>
+			bar
+		</esi:remove>
+		<esi:include
+	}
+} -start
+
+varnish v1 -vcl+backend {
+	sub vcl_fetch {
+		esi;
+	}
+} -start
+
+client c1 {
+	txreq 
+	rxresp
+	expect resp.status == 200
+	expect resp.http.content-length == 72
+} -run
+
+varnish v1  -cli "param.set esi_syntax 1" 
+
+client c1 {
+	txreq -url bar
+	rxresp
+	expect resp.status == 200
+	expect resp.http.transfer-encoding == "chunked"
+} -run




More information about the varnish-commit mailing list