]> err.no Git - varnish/commitdiff
More test-cases
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 15 Jun 2008 20:57:08 +0000 (20:57 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 15 Jun 2008 20:57:08 +0000 (20:57 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2696 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishtest/tests/a00003.vtc [new file with mode: 0644]
varnish-cache/bin/varnishtest/tests/a00004.vtc [new file with mode: 0644]
varnish-cache/bin/varnishtest/tests/a00005.vtc [new file with mode: 0644]

diff --git a/varnish-cache/bin/varnishtest/tests/a00003.vtc b/varnish-cache/bin/varnishtest/tests/a00003.vtc
new file mode 100644 (file)
index 0000000..be24a48
--- /dev/null
@@ -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 (file)
index 0000000..82e94e5
--- /dev/null
@@ -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 (file)
index 0000000..3b5f81a
--- /dev/null
@@ -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