]> err.no Git - varnish/commitdiff
A couple more basic tests: pass and cache hit
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 17 Jun 2008 20:35:45 +0000 (20:35 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 17 Jun 2008 20:35:45 +0000 (20:35 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2731 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishtest/tests/b00002.vtc [new file with mode: 0644]
varnish-cache/bin/varnishtest/tests/b00003.vtc [new file with mode: 0644]

diff --git a/varnish-cache/bin/varnishtest/tests/b00002.vtc b/varnish-cache/bin/varnishtest/tests/b00002.vtc
new file mode 100644 (file)
index 0000000..dab4bed
--- /dev/null
@@ -0,0 +1,26 @@
+# $Id$
+
+test "Check that a pass transaction works"
+
+server s1 -repeat 1 {
+       rxreq 
+       txresp \
+               -hdr "Connection: close" \
+               -body "012345\n"
+}
+
+varnish v1 -vcl+backend {
+       sub vcl_recv {
+               pass;
+       }
+} -start
+
+server s1 -start 
+
+client c1 {
+       txreq -url "/"
+       rxresp
+       expect resp.status == 200
+}
+
+client c1 -run
diff --git a/varnish-cache/bin/varnishtest/tests/b00003.vtc b/varnish-cache/bin/varnishtest/tests/b00003.vtc
new file mode 100644 (file)
index 0000000..04e4d7d
--- /dev/null
@@ -0,0 +1,23 @@
+# $Id$
+
+test "Check that a cache fetch + hit transaction works"
+
+server s1 {
+       rxreq 
+       txresp \
+               -hdr "Connection: close" \
+               -body "012345\n"
+}
+
+varnish v1 -vcl+backend { } -start
+
+server s1 -start 
+
+client c1 {
+       txreq -url "/"
+       rxresp
+       expect resp.status == 200
+}
+
+client c1 -run
+client c1 -run