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

phk at projects.linpro.no phk at projects.linpro.no
Mon Jun 23 18:49:48 CEST 2008


Author: phk
Date: 2008-06-23 18:49:48 +0200 (Mon, 23 Jun 2008)
New Revision: 2780

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/a00003.vtc
   trunk/varnish-cache/bin/varnishtest/tests/a00004.vtc
   trunk/varnish-cache/bin/varnishtest/tests/a00005.vtc
   trunk/varnish-cache/bin/varnishtest/tests/a00006.vtc
   trunk/varnish-cache/bin/varnishtest/tests/a00007.vtc
   trunk/varnish-cache/bin/varnishtest/tests/b00000.vtc
   trunk/varnish-cache/bin/varnishtest/tests/c00002.vtc
   trunk/varnish-cache/bin/varnishtest/vtc_server.c
Log:
On FreeBSD at least "localhost" resolves to two address, one IPv4
and one IPv6, resort to "127.0.0.1"



Modified: trunk/varnish-cache/bin/varnishtest/tests/a00000.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/a00000.vtc	2008-06-23 14:11:02 UTC (rev 2779)
+++ trunk/varnish-cache/bin/varnishtest/tests/a00000.vtc	2008-06-23 16:49:48 UTC (rev 2780)
@@ -2,14 +2,14 @@
 
 test "basic default HTTP transactions"
 
-server s1 -listen localhost:9080 {
+server s1 -listen 127.0.0.1:9080 {
 	rxreq
 	txresp 
 }
 
 server s1 -start 
 
-client c1 -connect localhost:9080 {
+client c1 -connect 127.0.0.1:9080 {
 	txreq 
 	rxresp
 }

Modified: trunk/varnish-cache/bin/varnishtest/tests/a00001.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/a00001.vtc	2008-06-23 14:11:02 UTC (rev 2779)
+++ trunk/varnish-cache/bin/varnishtest/tests/a00001.vtc	2008-06-23 16:49:48 UTC (rev 2780)
@@ -2,7 +2,7 @@
 
 test "basic default HTTP transactions with expect"
 
-server s1 -listen localhost:9080 {
+server s1 -listen 127.0.0.1:9080 {
 	rxreq
 	expect req.request == GET
 	expect req.proto == HTTP/1.1
@@ -12,7 +12,7 @@
 
 server s1 -start 
 
-client c1 -connect localhost:9080 {
+client c1 -connect 127.0.0.1:9080 {
 	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	2008-06-23 14:11:02 UTC (rev 2779)
+++ trunk/varnish-cache/bin/varnishtest/tests/a00002.vtc	2008-06-23 16:49:48 UTC (rev 2780)
@@ -2,7 +2,7 @@
 
 test "basic default HTTP transactions with expect and options"
 
-server s1 -listen localhost:9080 {
+server s1 -listen 127.0.0.1:9080 {
 	rxreq
 	expect req.request == PUT
 	expect req.proto == HTTP/1.0
@@ -12,7 +12,7 @@
 
 server s1 -start 
 
-client c1 -connect localhost:9080 {
+client c1 -connect 127.0.0.1:9080 {
 	txreq -req PUT -proto HTTP/1.0 -url /foo
 	rxresp
 	expect resp.proto == HTTP/1.2

Modified: trunk/varnish-cache/bin/varnishtest/tests/a00003.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/a00003.vtc	2008-06-23 14:11:02 UTC (rev 2779)
+++ trunk/varnish-cache/bin/varnishtest/tests/a00003.vtc	2008-06-23 16:49:48 UTC (rev 2780)
@@ -2,7 +2,7 @@
 
 test "dual independent HTTP transactions"
 
-server s1 -listen localhost:9080 {
+server s1 -listen 127.0.0.1:9080 {
 	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 localhost:9081 {
+server s2 -listen 127.0.0.1:9081 {
 	rxreq
 	expect req.request == GET
 	expect req.proto == HTTP/1.1
@@ -21,7 +21,7 @@
 server s1 -start 
 server s2 -start 
 
-client c1 -connect localhost:9080 {
+client c1 -connect 127.0.0.1:9080 {
 	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 localhost:9081 {
+client c2 -connect 127.0.0.1:9081 {
 	txreq 
 	rxresp
 	expect resp.proto == HTTP/1.1

Modified: trunk/varnish-cache/bin/varnishtest/tests/a00004.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/a00004.vtc	2008-06-23 14:11:02 UTC (rev 2779)
+++ trunk/varnish-cache/bin/varnishtest/tests/a00004.vtc	2008-06-23 16:49:48 UTC (rev 2780)
@@ -2,7 +2,7 @@
 
 test "dual shared server HTTP transactions"
 
-server s1 -listen localhost:9080 -repeat 2 {
+server s1 -listen 127.0.0.1:9080 -repeat 2 {
 	rxreq
 	expect req.request == PUT
 	expect req.proto == HTTP/1.0
@@ -12,7 +12,7 @@
 
 server s1 -start 
 
-client c1 -connect localhost:9080 {
+client c1 -connect 127.0.0.1:9080 {
 	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 localhost:9080 {
+client c2 -connect 127.0.0.1:9080 {
 	txreq -req PUT -proto HTTP/1.0 -url /foo
 	rxresp
 	expect resp.proto == HTTP/1.2

Modified: trunk/varnish-cache/bin/varnishtest/tests/a00005.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/a00005.vtc	2008-06-23 14:11:02 UTC (rev 2779)
+++ trunk/varnish-cache/bin/varnishtest/tests/a00005.vtc	2008-06-23 16:49:48 UTC (rev 2780)
@@ -2,7 +2,7 @@
 
 test "dual shared client HTTP transactions"
 
-server s1 -listen localhost:9080 {
+server s1 -listen 127.0.0.1:9080 {
 	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 localhost:9081 {
+server s2 -listen 127.0.0.1:9081 {
 	rxreq
 	expect req.request == GET
 	expect req.proto == HTTP/1.1
@@ -21,7 +21,7 @@
 server s1 -start 
 server s2 -start 
 
-client c1 -connect localhost:9080 {
+client c1 -connect 127.0.0.1:9080 {
 	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 localhost:9081 {
+client c1 -connect 127.0.0.1:9081 {
 	txreq 
 	rxresp
 	expect resp.proto == HTTP/1.1

Modified: trunk/varnish-cache/bin/varnishtest/tests/a00006.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/a00006.vtc	2008-06-23 14:11:02 UTC (rev 2779)
+++ trunk/varnish-cache/bin/varnishtest/tests/a00006.vtc	2008-06-23 16:49:48 UTC (rev 2780)
@@ -2,7 +2,7 @@
 
 test "bidirectional message bodies"
 
-server s1 -listen localhost:9080 {
+server s1 -listen 127.0.0.1:9080 {
 	rxreq
 	expect req.request == PUT
 	expect req.proto == HTTP/1.0
@@ -14,7 +14,7 @@
 
 server s1 -start 
 
-client c1 -connect localhost:9080 {
+client c1 -connect 127.0.0.1:9080 {
 	txreq -req PUT -proto HTTP/1.0 -url /foo \
 		-hdr "Content-Length: 10" \
 		-body "123456789\n"

Modified: trunk/varnish-cache/bin/varnishtest/tests/a00007.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/a00007.vtc	2008-06-23 14:11:02 UTC (rev 2779)
+++ trunk/varnish-cache/bin/varnishtest/tests/a00007.vtc	2008-06-23 16:49:48 UTC (rev 2780)
@@ -2,7 +2,7 @@
 
 test "TCP reuse"
 
-server s1 -listen localhost:9080 {
+server s1 -listen 127.0.0.1:9080 {
 	rxreq
 	expect req.url == "/1"
 	txresp -hdr "Content-Length: 10" -body "123456789\n"
@@ -13,7 +13,7 @@
 
 server s1 -start 
 
-client c1 -connect localhost:9080 {
+client c1 -connect 127.0.0.1:9080 {
 	txreq -url "/1" -req "POST" \
 	    -hdr "Content-Length: 10" -body "abcdefghi\n"
 	rxresp

Modified: trunk/varnish-cache/bin/varnishtest/tests/b00000.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/b00000.vtc	2008-06-23 14:11:02 UTC (rev 2779)
+++ trunk/varnish-cache/bin/varnishtest/tests/b00000.vtc	2008-06-23 16:49:48 UTC (rev 2780)
@@ -2,7 +2,7 @@
 #
 # $Id$
 
-varnish v1 -arg "-b localhost:9080" -start
+varnish v1 -arg "-b 127.0.0.1:9080" -start
 
 server s1 {
 	rxreq 

Modified: trunk/varnish-cache/bin/varnishtest/tests/c00002.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00002.vtc	2008-06-23 14:11:02 UTC (rev 2779)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00002.vtc	2008-06-23 16:49:48 UTC (rev 2780)
@@ -4,7 +4,7 @@
 
 test "Check that multiple thread pools all get started"
 
-varnish v1 -arg "-b localhost:9080 -p thread_pools=9" -start
+varnish v1 -arg "-b 127.0.0.1:9080 -p thread_pools=9" -start
 
 server s1 {
 	rxreq 

Modified: trunk/varnish-cache/bin/varnishtest/vtc_server.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_server.c	2008-06-23 14:11:02 UTC (rev 2779)
+++ trunk/varnish-cache/bin/varnishtest/vtc_server.c	2008-06-23 16:49:48 UTC (rev 2780)
@@ -120,7 +120,7 @@
 		vtc_log(s->vl, 0, "Server name must start with 's'");
 		exit (1);
 	}
-	s->listen = "localhost:9080";
+	s->listen = "127.0.0.1:9080";
 	AZ(VSS_parse(s->listen, &s->addr, &s->port));
 	s->repeat = 1;
 	s->depth = 1;
@@ -192,7 +192,7 @@
 		vsb_printf(vsb,
 		    "backend %s { .host = \"%s\"; .port = \"%s\"; }\n",
 		    s->name,
-		    s->addr == NULL ? "localhost" : s->addr,
+		    s->addr == NULL ? "127.0.0.1" : s->addr,
 		    s->port);
 	}
 }




More information about the varnish-commit mailing list