Commit f5edd611 authored by Tollef Fog Heen's avatar Tollef Fog Heen

Merge r3505: Expand critbit test for more coverage



git-svn-id: http://www.varnish-cache.org/svn/branches/2.0@3695 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 9d2244a6
...@@ -4,6 +4,7 @@ test "Test -h critbit a bit" ...@@ -4,6 +4,7 @@ test "Test -h critbit a bit"
server s1 { server s1 {
rxreq rxreq
expect req.url == "/"
txresp -hdr "Connection: close" -body "012345\n" txresp -hdr "Connection: close" -body "012345\n"
} -start } -start
...@@ -23,10 +24,38 @@ client c2 { ...@@ -23,10 +24,38 @@ client c2 {
expect resp.http.X-Varnish == "1002 1001" expect resp.http.X-Varnish == "1002 1001"
} -run } -run
varnish v1 -expect client_conn == 2 server s1 {
varnish v1 -expect cache_hit == 1 rxreq
varnish v1 -expect cache_miss == 1 expect req.url == "/foo"
varnish v1 -expect client_req == 2 txresp -body "012345\n"
varnish v1 -expect s_sess == 2 rxreq
varnish v1 -expect s_req == 2 expect req.url == "/bar"
varnish v1 -expect s_fetch == 1 txresp -body "012345\n"
} -start
client c2 {
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.X-Varnish == "1003"
txreq -url "/"
rxresp
expect resp.status == 200
expect resp.http.X-Varnish == "1004 1001"
txreq -url "/bar"
rxresp
expect resp.status == 200
expect resp.http.X-Varnish == "1005"
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.X-Varnish == "1006 1003"
} -run
varnish v1 -expect client_conn == 3
varnish v1 -expect cache_hit == 3
varnish v1 -expect cache_miss == 3
varnish v1 -expect client_req == 6
varnish v1 -expect s_sess == 3
varnish v1 -expect s_req == 6
varnish v1 -expect s_fetch == 3
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