From 501e288f7c9f72e69af281e00adb589da9f1c899 Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 17 Jun 2008 20:35:45 +0000 Subject: [PATCH] A couple more basic tests: pass and cache hit git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2731 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- .../bin/varnishtest/tests/b00002.vtc | 26 +++++++++++++++++++ .../bin/varnishtest/tests/b00003.vtc | 23 ++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 varnish-cache/bin/varnishtest/tests/b00002.vtc create mode 100644 varnish-cache/bin/varnishtest/tests/b00003.vtc diff --git a/varnish-cache/bin/varnishtest/tests/b00002.vtc b/varnish-cache/bin/varnishtest/tests/b00002.vtc new file mode 100644 index 00000000..dab4bede --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/b00002.vtc @@ -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 index 00000000..04e4d7d9 --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/b00003.vtc @@ -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 -- 2.39.5