From e7362025b45027634d85bc7e81a92ede1c58e4cf Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 12 Jan 2009 12:57:30 +0000 Subject: [PATCH] Add a minimal testcase of critbit git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3503 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- .../bin/varnishtest/tests/c00020.vtc | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 varnish-cache/bin/varnishtest/tests/c00020.vtc diff --git a/varnish-cache/bin/varnishtest/tests/c00020.vtc b/varnish-cache/bin/varnishtest/tests/c00020.vtc new file mode 100644 index 00000000..b4735a8f --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/c00020.vtc @@ -0,0 +1,32 @@ +# $Id$ + +test "Test -h critbit a bit" + +server s1 { + rxreq + txresp -hdr "Connection: close" -body "012345\n" +} -start + +varnish v1 -arg "-hcritbit" -vcl+backend { } -start + +client c1 { + txreq -url "/" + rxresp + expect resp.status == 200 + expect resp.http.X-Varnish == "1001" +} -run + +client c2 { + txreq -url "/" + rxresp + expect resp.status == 200 + expect resp.http.X-Varnish == "1002 1001" +} -run + +varnish v1 -expect client_conn == 2 +varnish v1 -expect cache_hit == 1 +varnish v1 -expect cache_miss == 1 +varnish v1 -expect client_req == 2 +varnish v1 -expect s_sess == 2 +varnish v1 -expect s_req == 2 +varnish v1 -expect s_fetch == 1 -- 2.39.5