r4364 - in trunk/varnish-cache/bin/varnishtest: . tests

phk at projects.linpro.no phk at projects.linpro.no
Tue Nov 24 20:08:39 CET 2009


Author: phk
Date: 2009-11-24 20:08:39 +0100 (Tue, 24 Nov 2009)
New Revision: 4364

Modified:
   trunk/varnish-cache/bin/varnishtest/tests/a00003.vtc
   trunk/varnish-cache/bin/varnishtest/tests/a00005.vtc
   trunk/varnish-cache/bin/varnishtest/tests/a00008.vtc
   trunk/varnish-cache/bin/varnishtest/tests/c00009.vtc
   trunk/varnish-cache/bin/varnishtest/tests/e00006.vtc
   trunk/varnish-cache/bin/varnishtest/tests/r00433.vtc
   trunk/varnish-cache/bin/varnishtest/tests/v00009.vtc
   trunk/varnish-cache/bin/varnishtest/tests/v00022.vtc
   trunk/varnish-cache/bin/varnishtest/vtc_server.c
Log:
Let servers pick a randomly assigned TCP port, if nothing is
explicitly specified, and use macros to pick up the result
as necessary.



Modified: trunk/varnish-cache/bin/varnishtest/tests/a00003.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/a00003.vtc	2009-11-24 18:48:14 UTC (rev 4363)
+++ trunk/varnish-cache/bin/varnishtest/tests/a00003.vtc	2009-11-24 19:08:39 UTC (rev 4364)
@@ -2,7 +2,7 @@
 
 test "dual independent HTTP transactions"
 
-server s1 -listen 127.0.0.1:9080 {
+server s1 {
 	rxreq
 	expect req.request == PUT
 	expect req.proto == HTTP/1.0
@@ -10,7 +10,7 @@
 	txresp -proto HTTP/1.2 -status 201 -msg Foo
 }
 
-server s2 -listen 127.0.0.1:9081 {
+server s2 {
 	rxreq
 	expect req.request == GET
 	expect req.proto == HTTP/1.1
@@ -21,7 +21,7 @@
 server s1 -start 
 server s2 -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
@@ -29,7 +29,7 @@
 	expect resp.msg == Foo
 }
 
-client c2 -connect 127.0.0.1:9081 {
+client c2 -connect $s2_sock {
 	txreq 
 	rxresp
 	expect resp.proto == HTTP/1.1

Modified: trunk/varnish-cache/bin/varnishtest/tests/a00005.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/a00005.vtc	2009-11-24 18:48:14 UTC (rev 4363)
+++ trunk/varnish-cache/bin/varnishtest/tests/a00005.vtc	2009-11-24 19:08:39 UTC (rev 4364)
@@ -2,7 +2,7 @@
 
 test "dual shared client HTTP transactions"
 
-server s1 -listen 127.0.0.1:9080 {
+server s1 {
 	rxreq
 	expect req.request == PUT
 	expect req.proto == HTTP/1.0
@@ -10,7 +10,7 @@
 	txresp -proto HTTP/1.2 -status 201 -msg Foo
 }
 
-server s2 -listen 127.0.0.1:9081 {
+server s2 {
 	rxreq
 	expect req.request == GET
 	expect req.proto == HTTP/1.1
@@ -21,7 +21,7 @@
 server s1 -start 
 server s2 -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
@@ -31,7 +31,7 @@
 
 client c1 -run
 
-client c1 -connect 127.0.0.1:9081 {
+client c1 -connect $s2_sock {
 	txreq 
 	rxresp
 	expect resp.proto == HTTP/1.1

Modified: trunk/varnish-cache/bin/varnishtest/tests/a00008.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/a00008.vtc	2009-11-24 18:48:14 UTC (rev 4363)
+++ trunk/varnish-cache/bin/varnishtest/tests/a00008.vtc	2009-11-24 19:08:39 UTC (rev 4364)
@@ -2,42 +2,42 @@
 
 test "Sema operations"
 
-server s1 -listen 127.0.0.1:9080 {
+server s1 {
 	rxreq
 	sema r1 sync 4
 	delay .9
 	txresp
 } -start
 
-server s2 -listen 127.0.0.1:9081 {
+server s2 {
 	rxreq
 	sema r1 sync 4
 	delay .6
 	txresp
 } -start
 
-server s3 -listen 127.0.0.1:9082 {
+server s3 {
 	rxreq
 	sema r1 sync 4
 	delay .2
 	txresp
 } -start
 
-client c1 -connect 127.0.0.1:9080 {
+client c1 -connect $s1_sock {
 	delay .2
 	txreq
 	rxresp
 	sema r1 sync 4
 } -start
 
-client c2 -connect 127.0.0.1:9081 {
+client c2 -connect $s2_sock {
 	delay .6
 	txreq
 	rxresp
 	sema r1 sync 4
 } -start
 
-client c3 -connect 127.0.0.1:9082 {
+client c3 -connect $s3_sock {
 	delay .9
 	txreq
 	rxresp

Modified: trunk/varnish-cache/bin/varnishtest/tests/c00009.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00009.vtc	2009-11-24 18:48:14 UTC (rev 4363)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00009.vtc	2009-11-24 19:08:39 UTC (rev 4364)
@@ -8,7 +8,7 @@
 	txresp -status 404 
 } -start
 
-server s2 -listen 127.0.0.1:9180 {
+server s2 {
 	rxreq
 	expect req.url == "/foo"
 	txresp -body "foobar"

Modified: trunk/varnish-cache/bin/varnishtest/tests/e00006.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/e00006.vtc	2009-11-24 18:48:14 UTC (rev 4363)
+++ trunk/varnish-cache/bin/varnishtest/tests/e00006.vtc	2009-11-24 19:08:39 UTC (rev 4364)
@@ -15,7 +15,7 @@
 } -start
 
 
-server s2 -listen 127.0.0.1:9180 {
+server s2 {
 	rxreq
 	expect req.url == "/body"
 	txresp -body {

Modified: trunk/varnish-cache/bin/varnishtest/tests/r00433.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/r00433.vtc	2009-11-24 18:48:14 UTC (rev 4363)
+++ trunk/varnish-cache/bin/varnishtest/tests/r00433.vtc	2009-11-24 19:08:39 UTC (rev 4364)
@@ -18,7 +18,7 @@
 
 } -start
 
-server s2 -listen 127.0.0.1:9082 {
+server s2 {
 	rxreq
 	expect req.url == "/bar"
 	txresp -body "bar"

Modified: trunk/varnish-cache/bin/varnishtest/tests/v00009.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/v00009.vtc	2009-11-24 18:48:14 UTC (rev 4363)
+++ trunk/varnish-cache/bin/varnishtest/tests/v00009.vtc	2009-11-24 19:08:39 UTC (rev 4364)
@@ -2,23 +2,23 @@
 
 test "Test round robin director"
 
-server s1 -listen 127.0.0.1:2000 {
+server s1 {
 	rxreq
 	txresp -body "1"
 } -start
 
-server s2 -listen 127.0.0.1:3000 {
+server s2 {
 	rxreq
 	txresp -body "22"
 } -start
 
 
-server s3 -listen 127.0.0.1:4000 {
+server s3 {
 	rxreq
 	txresp -body "333"
 } -start
 
-server s4 -listen 127.0.0.1:5000 {
+server s4 {
 	rxreq
 	txresp -body "4444"
 } -start

Modified: trunk/varnish-cache/bin/varnishtest/tests/v00022.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/v00022.vtc	2009-11-24 18:48:14 UTC (rev 4363)
+++ trunk/varnish-cache/bin/varnishtest/tests/v00022.vtc	2009-11-24 19:08:39 UTC (rev 4364)
@@ -8,7 +8,7 @@
 	rxreq
 	txresp -body "1"
 } -start
-server s2 -listen 127.0.0.1:9180 {
+server s2 {
 	rxreq
 	txresp -body "22"
 	rxreq
@@ -16,11 +16,11 @@
 	rxreq
 	txresp -body "22"
 } -start
-server s3 -listen 127.0.0.1:9181 {
+server s3 {
 	rxreq
 	txresp -body "333"
 } -start
-server s4 -listen 127.0.0.1:9182 {
+server s4 {
 	rxreq
 	txresp -body "4444"
 	rxreq

Modified: trunk/varnish-cache/bin/varnishtest/vtc_server.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_server.c	2009-11-24 18:48:14 UTC (rev 4363)
+++ trunk/varnish-cache/bin/varnishtest/vtc_server.c	2009-11-24 19:08:39 UTC (rev 4364)
@@ -132,7 +132,7 @@
 	if (*s->name != 's')
 		vtc_log(s->vl, 0, "Server name must start with 's'");
 
-	REPLACE(s->listen, "127.0.0.1:9080");
+	REPLACE(s->listen, "127.0.0.1:0");
 	AZ(VSS_parse(s->listen, &s->addr, &s->port));
 	s->repeat = 1;
 	s->depth = 1;



More information about the varnish-commit mailing list