Commit ce95389b authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make the first testcase a test of the testprogram



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2672 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent c763e504
# Test that we get anything through at all
# Quis custodiet ipsos custodes?
#
server s1 -repeat 3 {
server s1 -listen :9080 {
rxreq
expect url == "/"
txresponse -body "0123456789"
......@@ -9,67 +9,13 @@ server s1 -repeat 3 {
server s1 -start
client c1 {
client c1 -connect localhost:9080 {
txreq -url "/"
rxresponse
expect status == 200
expect length == 10
}
#######################################################################
# Test trivial pipe mode
vcl {
$s1;
sub vcl_recv {
set req.backend = s1;
pipe;
}
}
client c1 -run
#######################################################################
# Test trivial pass mode
vcl {
$s1;
sub vcl_recv {
set req.backend = s1;
pass;
}
}
client c1 -run
#######################################################################
# Test trivial cache mode
vcl {
$s1;
sub vcl_recv {
set req.backend = s1;
}
}
client c1 -run
server s1 -wait
#######################################################################
# And see that it stuck in cache
client c1 -run
varnish stop
stats {
expect client_conn == 4
expect client_req == 4
expect cache_hit == 1
expect cache_miss == 1
expect s_pipe == 1
expect s_pass == 1
expect s_fetch == 2
}
# Test that we get anything through at all
#
server s1 -repeat 3 {
rxreq
expect url == "/"
txresponse -body "0123456789"
}
server s1 -start
client c1 {
txreq -url "/"
rxresponse
expect status == 200
expect length == 10
}
#######################################################################
# Test trivial pipe mode
vcl {
$s1;
sub vcl_recv {
set req.backend = s1;
pipe;
}
}
client c1 -run
#######################################################################
# Test trivial pass mode
vcl {
$s1;
sub vcl_recv {
set req.backend = s1;
pass;
}
}
client c1 -run
#######################################################################
# Test trivial cache mode
vcl {
$s1;
sub vcl_recv {
set req.backend = s1;
}
}
client c1 -run
server s1 -wait
#######################################################################
# And see that it stuck in cache
client c1 -run
varnish stop
stats {
expect client_conn == 4
expect client_req == 4
expect cache_hit == 1
expect cache_miss == 1
expect s_pipe == 1
expect s_pass == 1
expect s_fetch == 2
}
......@@ -170,6 +170,11 @@ cmd_server(char **av, void *priv)
av++;
continue;
}
if (!strcmp(*av, "-listen")) {
s->listen = av[1];
av++;
continue;
}
if (!strcmp(*av, "-start")) {
server_start(s);
continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment