]> err.no Git - varnish/commitdiff
Describe tests with test keyword
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 15 Jun 2008 20:50:24 +0000 (20:50 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 15 Jun 2008 20:50:24 +0000 (20:50 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2695 d4fa192b-c00b-0410-8231-f00ffab90ce4

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

index 178e1ca39d94ee56f8d9ead4bc15effd12f2bb4c..9371980e2fbbbb99e0a0969a60109709cbe89bbf 100644 (file)
@@ -1,7 +1,7 @@
-# Quis custodiet ipsos custodes?
-#
 # $Id$
 
+test "basic default HTTP transactions"
+
 server s1 -listen :9080 {
        rxreq
        txresp 
index 764bc54bf20f2d286533298b10c31e1b52730c0b..f2607c9826ea6775bc4c5ba3ed2d7b57dadcb7eb 100644 (file)
@@ -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 (file)
index 0000000..04f96dd
--- /dev/null
@@ -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