From: phk Date: Sun, 15 Jun 2008 20:57:08 +0000 (+0000) Subject: More test-cases X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4df314836ec715d6497361555dd649a59681e728;p=varnish More test-cases git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2696 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishtest/tests/a00003.vtc b/varnish-cache/bin/varnishtest/tests/a00003.vtc new file mode 100644 index 00000000..be24a485 --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/a00003.vtc @@ -0,0 +1,47 @@ +# $Id$ + +test "dual independent HTTP transactions" + +server s1 -listen :9080 { + rxreq + expect req.request == PUT + expect req.proto == HTTP/1.0 + expect req.url == "/foo" + txresp -proto HTTP/1.2 -status 201 -msg Foo +} + +server s2 -listen :9081 { + rxreq + expect req.request == GET + expect req.proto == HTTP/1.1 + expect req.url == "/" + txresp +} + +server s1 -start +server s2 -start + +client c1 -connect localhost:9080 { + txreq -req PUT -proto HTTP/1.0 -url /foo + rxresp + expect resp.proto == HTTP/1.2 + expect resp.status == 201 + expect resp.msg == Foo +} + +client c2 -connect localhost:9081 { + txreq + rxresp + expect resp.proto == HTTP/1.1 + expect resp.status == 200 + expect resp.msg == Ok +} + +client c1 -start +client c2 -start + +client c1 -wait +client c2 -wait + +server s1 -wait +server s2 -wait diff --git a/varnish-cache/bin/varnishtest/tests/a00004.vtc b/varnish-cache/bin/varnishtest/tests/a00004.vtc new file mode 100644 index 00000000..82e94e57 --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/a00004.vtc @@ -0,0 +1,37 @@ +# $Id$ + +test "dual shared server HTTP transactions" + +server s1 -listen :9080 -repeat 2 { + rxreq + expect req.request == PUT + expect req.proto == HTTP/1.0 + expect req.url == "/foo" + txresp -proto HTTP/1.2 -status 201 -msg Foo +} + +server s1 -start + +client c1 -connect localhost:9080 { + txreq -req PUT -proto HTTP/1.0 -url /foo + rxresp + expect resp.proto == HTTP/1.2 + expect resp.status == 201 + expect resp.msg == Foo +} + +client c2 -connect localhost:9080 { + txreq -req PUT -proto HTTP/1.0 -url /foo + rxresp + expect resp.proto == HTTP/1.2 + expect resp.status == 201 + expect resp.msg == Foo +} + +client c1 -start +client c2 -start + +client c1 -wait +client c2 -wait + +server s1 -wait diff --git a/varnish-cache/bin/varnishtest/tests/a00005.vtc b/varnish-cache/bin/varnishtest/tests/a00005.vtc new file mode 100644 index 00000000..3b5f81a6 --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/a00005.vtc @@ -0,0 +1,45 @@ +# $Id$ + +test "dual shared client HTTP transactions" + +server s1 -listen :9080 { + rxreq + expect req.request == PUT + expect req.proto == HTTP/1.0 + expect req.url == "/foo" + txresp -proto HTTP/1.2 -status 201 -msg Foo +} + +server s2 -listen :9081 { + rxreq + expect req.request == GET + expect req.proto == HTTP/1.1 + expect req.url == "/" + txresp +} + +server s1 -start +server s2 -start + +client c1 -connect localhost:9080 { + txreq -req PUT -proto HTTP/1.0 -url /foo + rxresp + expect resp.proto == HTTP/1.2 + expect resp.status == 201 + expect resp.msg == Foo +} + +client c1 -run + +client c1 -connect localhost:9081 { + txreq + rxresp + expect resp.proto == HTTP/1.1 + expect resp.status == 200 + expect resp.msg == Ok +} + +client c1 -run + +server s1 -wait +server s2 -wait