]> err.no Git - varnish/commitdiff
Add testcase for partial pipelining/read-ahead
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 27 Jun 2008 12:32:02 +0000 (12:32 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 27 Jun 2008 12:32:02 +0000 (12:32 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2852 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishtest/tests/b00013.vtc [new file with mode: 0644]

diff --git a/varnish-cache/bin/varnishtest/tests/b00013.vtc b/varnish-cache/bin/varnishtest/tests/b00013.vtc
new file mode 100644 (file)
index 0000000..cf5f508
--- /dev/null
@@ -0,0 +1,36 @@
+# $Id$
+
+test "Check read-head / partial pipelining"
+
+varnish v1 -arg "-h simple_list -b 127.0.0.1:9080" -start
+
+server s1 {
+       rxreq 
+       expect req.url == "/foo"
+       txresp -body "foo"
+       rxreq 
+       expect req.url == "/bar"
+       txresp -body "foobar"
+}
+
+server s1 -start 
+
+client c1 {
+       send "GET /foo HTTP/1.1\n\nGET "
+       rxresp
+       expect resp.status == 200
+       expect resp.http.content-length == 3
+       expect resp.http.x-varnish == "1001"
+       send "/bar HTTP/1.1\n\nGET /bar "
+       rxresp
+       expect resp.status == 200
+       expect resp.http.content-length == 6
+       expect resp.http.x-varnish == "1002"
+       send "HTTP/1.1\n\n"
+       rxresp
+       expect resp.status == 200
+       expect resp.http.content-length == 6
+       expect resp.http.x-varnish == "1003 1002"
+}
+
+client c1 -run