From: phk Date: Sun, 15 Jun 2008 20:50:24 +0000 (+0000) Subject: Describe tests with test keyword X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7ee4fe04a96dd1fb39a9c88ce1882afb807f3e8;p=varnish Describe tests with test keyword git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2695 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishtest/tests/a00000.vtc b/varnish-cache/bin/varnishtest/tests/a00000.vtc index 178e1ca3..9371980e 100644 --- a/varnish-cache/bin/varnishtest/tests/a00000.vtc +++ b/varnish-cache/bin/varnishtest/tests/a00000.vtc @@ -1,7 +1,7 @@ -# Quis custodiet ipsos custodes? -# # $Id$ +test "basic default HTTP transactions" + server s1 -listen :9080 { rxreq txresp diff --git a/varnish-cache/bin/varnishtest/tests/a00001.vtc b/varnish-cache/bin/varnishtest/tests/a00001.vtc index 764bc54b..f2607c98 100644 --- a/varnish-cache/bin/varnishtest/tests/a00001.vtc +++ b/varnish-cache/bin/varnishtest/tests/a00001.vtc @@ -1,13 +1,13 @@ -# Quis custodiet ipsos custodes? -# # $Id$ +test "basic default HTTP transactions with expect" + server s1 -listen :9080 { rxreq expect req.request == GET expect req.proto == HTTP/1.1 expect req.url == "/" - txresp -body "0123456789" + txresp } server s1 -start diff --git a/varnish-cache/bin/varnishtest/tests/a00002.vtc b/varnish-cache/bin/varnishtest/tests/a00002.vtc new file mode 100644 index 00000000..04f96ddb --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/a00002.vtc @@ -0,0 +1,25 @@ +# $Id$ + +test "basic default HTTP transactions with expect and options" + +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 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 c1 -run + +server s1 -wait