r4363 - trunk/varnish-cache/bin/varnishtest/tests
phk at projects.linpro.no
phk at projects.linpro.no
Tue Nov 24 19:48:14 CET 2009
Author: phk
Date: 2009-11-24 19:48:14 +0100 (Tue, 24 Nov 2009)
New Revision: 4363
Modified:
trunk/varnish-cache/bin/varnishtest/tests/a00000.vtc
trunk/varnish-cache/bin/varnishtest/tests/a00001.vtc
trunk/varnish-cache/bin/varnishtest/tests/a00002.vtc
trunk/varnish-cache/bin/varnishtest/tests/a00004.vtc
trunk/varnish-cache/bin/varnishtest/tests/a00006.vtc
trunk/varnish-cache/bin/varnishtest/tests/a00007.vtc
trunk/varnish-cache/bin/varnishtest/tests/a00010.vtc
trunk/varnish-cache/bin/varnishtest/tests/b00022.vtc
trunk/varnish-cache/bin/varnishtest/tests/b00025.vtc
trunk/varnish-cache/bin/varnishtest/tests/c00004.vtc
trunk/varnish-cache/bin/varnishtest/tests/c00017.vtc
trunk/varnish-cache/bin/varnishtest/tests/c00024.vtc
trunk/varnish-cache/bin/varnishtest/tests/c00030.vtc
trunk/varnish-cache/bin/varnishtest/tests/p00001.vtc
trunk/varnish-cache/bin/varnishtest/tests/p00003.vtc
trunk/varnish-cache/bin/varnishtest/tests/p00005.vtc
trunk/varnish-cache/bin/varnishtest/tests/r00306.vtc
trunk/varnish-cache/bin/varnishtest/tests/s00003.vtc
trunk/varnish-cache/bin/varnishtest/tests/v00006.vtc
trunk/varnish-cache/bin/varnishtest/tests/v00012.vtc
Log:
Update testcases to use macros where possible (that is: client -connect)
and make the listen address explicit where we depend on it, rather
than rely on the default port to be 9080.
Modified: trunk/varnish-cache/bin/varnishtest/tests/a00000.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/a00000.vtc 2009-11-24 17:36:13 UTC (rev 4362)
+++ trunk/varnish-cache/bin/varnishtest/tests/a00000.vtc 2009-11-24 18:48:14 UTC (rev 4363)
@@ -2,14 +2,14 @@
test "basic default HTTP transactions"
-server s1 -listen 127.0.0.1:9080 {
+server s1 {
rxreq
txresp
}
server s1 -start
-client c1 -connect 127.0.0.1:9080 {
+client c1 -connect $s1_sock {
txreq
rxresp
}
Modified: trunk/varnish-cache/bin/varnishtest/tests/a00001.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/a00001.vtc 2009-11-24 17:36:13 UTC (rev 4362)
+++ trunk/varnish-cache/bin/varnishtest/tests/a00001.vtc 2009-11-24 18:48:14 UTC (rev 4363)
@@ -2,7 +2,7 @@
test "basic default HTTP transactions with expect"
-server s1 -listen 127.0.0.1:9080 {
+server s1 {
rxreq
expect req.request == GET
expect req.proto == HTTP/1.1
@@ -12,7 +12,7 @@
server s1 -start
-client c1 -connect 127.0.0.1:9080 {
+client c1 -connect $s1_sock {
txreq
rxresp
expect resp.proto == HTTP/1.1
Modified: trunk/varnish-cache/bin/varnishtest/tests/a00002.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/a00002.vtc 2009-11-24 17:36:13 UTC (rev 4362)
+++ trunk/varnish-cache/bin/varnishtest/tests/a00002.vtc 2009-11-24 18:48:14 UTC (rev 4363)
@@ -2,7 +2,7 @@
test "basic default HTTP transactions with expect and options"
-server s1 -listen 127.0.0.1:9080 {
+server s1 {
rxreq
expect req.request == PUT
expect req.proto == HTTP/1.0
@@ -12,7 +12,7 @@
server s1 -start
-client c1 -connect 127.0.0.1:9080 {
+client c1 -connect $s1_sock {
txreq -req PUT -proto HTTP/1.0 -url /foo
rxresp
expect resp.proto == HTTP/1.2
Modified: trunk/varnish-cache/bin/varnishtest/tests/a00004.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/a00004.vtc 2009-11-24 17:36:13 UTC (rev 4362)
+++ trunk/varnish-cache/bin/varnishtest/tests/a00004.vtc 2009-11-24 18:48:14 UTC (rev 4363)
@@ -2,7 +2,7 @@
test "dual shared server HTTP transactions"
-server s1 -listen 127.0.0.1:9080 -repeat 2 {
+server s1 -repeat 2 {
rxreq
expect req.request == PUT
expect req.proto == HTTP/1.0
@@ -12,7 +12,7 @@
server s1 -start
-client c1 -connect 127.0.0.1:9080 {
+client c1 -connect $s1_sock {
txreq -req PUT -proto HTTP/1.0 -url /foo
rxresp
expect resp.proto == HTTP/1.2
@@ -20,7 +20,7 @@
expect resp.msg == Foo
}
-client c2 -connect 127.0.0.1:9080 {
+client c2 -connect $s1_sock {
txreq -req PUT -proto HTTP/1.0 -url /foo
rxresp
expect resp.proto == HTTP/1.2
Modified: trunk/varnish-cache/bin/varnishtest/tests/a00006.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/a00006.vtc 2009-11-24 17:36:13 UTC (rev 4362)
+++ trunk/varnish-cache/bin/varnishtest/tests/a00006.vtc 2009-11-24 18:48:14 UTC (rev 4363)
@@ -2,7 +2,7 @@
test "bidirectional message bodies"
-server s1 -listen 127.0.0.1:9080 {
+server s1 {
rxreq
expect req.request == PUT
expect req.proto == HTTP/1.0
@@ -13,7 +13,7 @@
server s1 -start
-client c1 -connect 127.0.0.1:9080 {
+client c1 -connect $s1_sock {
txreq -req PUT -proto HTTP/1.0 -url /foo \
-body "123456789\n"
rxresp
Modified: trunk/varnish-cache/bin/varnishtest/tests/a00007.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/a00007.vtc 2009-11-24 17:36:13 UTC (rev 4362)
+++ trunk/varnish-cache/bin/varnishtest/tests/a00007.vtc 2009-11-24 18:48:14 UTC (rev 4363)
@@ -2,7 +2,7 @@
test "TCP reuse"
-server s1 -listen 127.0.0.1:9080 {
+server s1 {
rxreq
expect req.url == "/1"
txresp -body "123456789\n"
@@ -13,7 +13,7 @@
server s1 -start
-client c1 -connect 127.0.0.1:9080 {
+client c1 -connect $s1_sock {
txreq -url "/1" -req "POST" -body "abcdefghi\n"
rxresp
txreq -url "/2" -req "POST" -body "ihgfedcba\n"
Modified: trunk/varnish-cache/bin/varnishtest/tests/a00010.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/a00010.vtc 2009-11-24 17:36:13 UTC (rev 4362)
+++ trunk/varnish-cache/bin/varnishtest/tests/a00010.vtc 2009-11-24 18:48:14 UTC (rev 4363)
@@ -2,7 +2,7 @@
test "simply test that the framework support \0"
-server s1 -listen 127.0.0.1:9080 {
+server s1 {
rxreq
expect req.url == "/"
txresp -body {a\0bc}
@@ -10,7 +10,7 @@
server s1 -start
-client c1 -connect 127.0.0.1:9080 {
+client c1 -connect $s1_sock {
txreq
rxresp
Modified: trunk/varnish-cache/bin/varnishtest/tests/b00022.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/b00022.vtc 2009-11-24 17:36:13 UTC (rev 4362)
+++ trunk/varnish-cache/bin/varnishtest/tests/b00022.vtc 2009-11-24 18:48:14 UTC (rev 4363)
@@ -2,7 +2,7 @@
test "Check the between_bytes_timeout behaves from backend definition"
-server s1 {
+server s1 -listen 127.0.0.1:9080 {
rxreq
send "HTTP/1.1 200 Ok\r\nConnection: close\r\n\r\n"
delay 1.5
Modified: trunk/varnish-cache/bin/varnishtest/tests/b00025.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/b00025.vtc 2009-11-24 17:36:13 UTC (rev 4362)
+++ trunk/varnish-cache/bin/varnishtest/tests/b00025.vtc 2009-11-24 18:48:14 UTC (rev 4363)
@@ -2,7 +2,7 @@
test "Check that the first_byte_timeout works from backend definition"
-server s1 {
+server s1 -listen 127.0.0.1:9080 {
rxreq
delay 1.5
txresp
Modified: trunk/varnish-cache/bin/varnishtest/tests/c00004.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00004.vtc 2009-11-24 17:36:13 UTC (rev 4362)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00004.vtc 2009-11-24 18:48:14 UTC (rev 4363)
@@ -2,8 +2,6 @@
test "Test Vary functionality"
-varnish v1 -arg "-b 127.0.0.1:9080" -start
-
server s1 {
rxreq
expect req.http.foobar == "1"
@@ -18,6 +16,8 @@
txresp -hdr "Vary: Foobar" -hdr "Snafu: 4" -body "4444\n"
} -start
+varnish v1 -vcl+backend {} -start
+
client c1 {
txreq -hdr "Foobar: 1"
rxresp
Modified: trunk/varnish-cache/bin/varnishtest/tests/c00017.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00017.vtc 2009-11-24 17:36:13 UTC (rev 4362)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00017.vtc 2009-11-24 18:48:14 UTC (rev 4363)
@@ -2,6 +2,12 @@
test "Test Backend Polling"
+server s1 -listen 127.0.0.1:9080 {
+ rxreq
+ expect req.url == "/"
+ txresp -hdr "Bar: foo" -body "foobar"
+} -start
+
varnish v1 -vcl {
backend foo {
@@ -15,11 +21,6 @@
} -start
-server s1 {
- rxreq
- expect req.url == "/"
- txresp -hdr "Bar: foo" -body "foobar"
-}
# Handle probes
server s1 -start -wait
Modified: trunk/varnish-cache/bin/varnishtest/tests/c00024.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00024.vtc 2009-11-24 17:36:13 UTC (rev 4362)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00024.vtc 2009-11-24 18:48:14 UTC (rev 4363)
@@ -2,7 +2,7 @@
test "Test restart in vcl_error"
-server s1 {
+server s1 -listen 127.0.0.1:9080 {
rxreq
txresp
} -start
Modified: trunk/varnish-cache/bin/varnishtest/tests/c00030.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00030.vtc 2009-11-24 17:36:13 UTC (rev 4362)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00030.vtc 2009-11-24 18:48:14 UTC (rev 4363)
@@ -2,7 +2,7 @@
test "Test that saintmode_threshold in VCL"
-server s1 {
+server s1 -listen 127.0.0.1:9080 {
rxreq
txresp
Modified: trunk/varnish-cache/bin/varnishtest/tests/p00001.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/p00001.vtc 2009-11-24 17:36:13 UTC (rev 4362)
+++ trunk/varnish-cache/bin/varnishtest/tests/p00001.vtc 2009-11-24 18:48:14 UTC (rev 4363)
@@ -22,7 +22,6 @@
} -run
varnish v1 -stop
-server s1 -wait
varnish v1 -vcl+backend {
sub vcl_hit {
@@ -30,6 +29,8 @@
}
}
+server s1 -wait
+
varnish v1 -start
client c1 {
@@ -42,17 +43,17 @@
varnish v1 -stop
+server s1 {
+ rxreq
+ txresp -hdr "Foo: bar"
+} -start
+
varnish v1 -vcl+backend { }
delay 2
varnish v1 -start
-server s1 {
- rxreq
- txresp -hdr "Foo: bar"
-} -start
-
client c1 {
txreq -url "/"
rxresp
Modified: trunk/varnish-cache/bin/varnishtest/tests/p00003.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/p00003.vtc 2009-11-24 17:36:13 UTC (rev 4362)
+++ trunk/varnish-cache/bin/varnishtest/tests/p00003.vtc 2009-11-24 18:48:14 UTC (rev 4363)
@@ -34,7 +34,7 @@
txresp -hdr "Foo: bar"
} -start
-varnish v1 -start
+varnish v1 -vcl+backend {} -start
varnish v1 -cliok purge.list
Modified: trunk/varnish-cache/bin/varnishtest/tests/p00005.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/p00005.vtc 2009-11-24 17:36:13 UTC (rev 4362)
+++ trunk/varnish-cache/bin/varnishtest/tests/p00005.vtc 2009-11-24 18:48:14 UTC (rev 4363)
@@ -35,7 +35,11 @@
txresp -hdr "Foo: foo2"
} -start
-varnish v1 -start
+varnish v1 -vcl+backend {
+ sub vcl_fetch {
+ set beresp.ttl = 3s;
+ }
+ } -start
delay 5
Modified: trunk/varnish-cache/bin/varnishtest/tests/r00306.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/r00306.vtc 2009-11-24 17:36:13 UTC (rev 4362)
+++ trunk/varnish-cache/bin/varnishtest/tests/r00306.vtc 2009-11-24 18:48:14 UTC (rev 4363)
@@ -2,7 +2,7 @@
test "Regression test for ticket #306, random director ignoring good backend"
-server s1 {
+server s1 -listen 127.0.0.1:9080 {
rxreq
expect req.url == /foo
Modified: trunk/varnish-cache/bin/varnishtest/tests/s00003.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/s00003.vtc 2009-11-24 17:36:13 UTC (rev 4362)
+++ trunk/varnish-cache/bin/varnishtest/tests/s00003.vtc 2009-11-24 18:48:14 UTC (rev 4363)
@@ -2,7 +2,7 @@
test "Check saint mode with sick pages"
-server s1 -listen 127.0.0.1:9080 {
+server s1 {
timeout 10
rxreq
@@ -16,8 +16,7 @@
txresp -status 200 -hdr "foo: 3"
} -start
-varnish v1 -vcl {
- backend b { .host = "127.0.0.1"; .port = "9080"; }
+varnish v1 -vcl+backend {
sub vcl_fetch {
set beresp.ttl = 1s;
set beresp.grace = 10m;
Modified: trunk/varnish-cache/bin/varnishtest/tests/v00006.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/v00006.vtc 2009-11-24 17:36:13 UTC (rev 4362)
+++ trunk/varnish-cache/bin/varnishtest/tests/v00006.vtc 2009-11-24 18:48:14 UTC (rev 4363)
@@ -4,17 +4,13 @@
# First do one request to get a work-thread that holds a VCL reference
-server s1 -listen 127.0.0.1:9080 {
+server s1 {
rxreq
txresp
} -start
# Only one pool, to avoid getting more than one work thread
-varnish v1 -arg "-p thread_pools=1 -w1,1,300" -vcl {
- backend b1 {
- .host = "127.0.0.1";
- .port = "9080";
- }
+varnish v1 -arg "-p thread_pools=1 -w1,1,300" -vcl+backend {
} -start
client c1 {
Modified: trunk/varnish-cache/bin/varnishtest/tests/v00012.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/v00012.vtc 2009-11-24 17:36:13 UTC (rev 4362)
+++ trunk/varnish-cache/bin/varnishtest/tests/v00012.vtc 2009-11-24 18:48:14 UTC (rev 4363)
@@ -2,7 +2,7 @@
test "Check backend connection limit"
-server s1 {
+server s1 -listen 127.0.0.1:9080 {
rxreq
sema r1 sync 2
sema r2 sync 2
More information about the varnish-commit
mailing list