[master] 3adc381 Make this test jail-compatible

Poul-Henning Kamp phk at FreeBSD.org
Mon Mar 6 16:49:05 CET 2017


commit 3adc381f9b528707f3508faeda1e73f10e05714c
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Mar 6 15:48:40 2017 +0000

    Make this test jail-compatible

diff --git a/bin/varnishtest/tests/o00004.vtc b/bin/varnishtest/tests/o00004.vtc
index 4d4c082..c9fb5d4 100644
--- a/bin/varnishtest/tests/o00004.vtc
+++ b/bin/varnishtest/tests/o00004.vtc
@@ -2,13 +2,16 @@ varnishtest "Sending proxy headers via health probes"
 
 # Double-proxy scheme stolen from o00002.vtc
 
+# Get ${v1_addr} defined so s1 can use it so v1 can use ${s1_addr}
+varnish v1 -proto PROXY -vcl {backend foo { .host = ":80"; }} -start
+
 server s1 {
 	rxreq
-	expect req.http.x-forwarded-for == "127.0.0.1"
+	expect req.http.x-forwarded-for == ${v1_addr}
 	txresp
 } -start
 
-varnish v1 -proto PROXY -vcl+backend {
+varnish v1 -vcl+backend {
 	import debug;
 
 	sub vcl_recv {
@@ -16,7 +19,7 @@ varnish v1 -proto PROXY -vcl+backend {
 			return (synth(400));
 		}
 	}
-} -start
+}
 
 varnish v2 -proto PROXY -vcl {
 	import std;



More information about the varnish-commit mailing list