[master] 286604ce4 fix b00016.vtc
Nils Goroll
nils.goroll at uplex.de
Sun Feb 17 13:45:12 UTC 2019
commit 286604ce44e69e61405f83086f57b5e57d7d76dc
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Sun Feb 17 14:42:50 2019 +0100
fix b00016.vtc
The second vcl did not actually do anything useful because the second
client would hit a cached response.
diff --git a/bin/varnishtest/tests/b00016.vtc b/bin/varnishtest/tests/b00016.vtc
index abf25b3b6..80d28d8cb 100644
--- a/bin/varnishtest/tests/b00016.vtc
+++ b/bin/varnishtest/tests/b00016.vtc
@@ -1,14 +1,17 @@
varnishtest "Check naming of backends"
-server s1 {
+server s1 -repeat 2 -keepalive {
rxreq
txresp
} -start
varnish v1 -vcl+backend {
+ sub vcl_recv {
+ return (pass);
+ }
sub vcl_backend_response {
- set beresp.http.X-Backend-Name = bereq.backend;
+ set beresp.http.X-Backend-Name = bereq.backend;
}
} -start
@@ -28,15 +31,18 @@ varnish v1 -vcl+backend {
sub vcl_recv {
set req.backend_hint = bar.backend();
+ return (pass);
}
sub vcl_backend_response {
- set beresp.http.X-Backend-Name = bereq.backend;
+ set beresp.http.X-Director-Name = bereq.backend;
+ set beresp.http.X-Backend-Name = beresp.backend;
}
}
client c1 {
txreq -url "/"
rxresp
+ expect resp.http.X-Director-Name == "bar"
expect resp.http.X-Backend-Name == "s1"
} -run
More information about the varnish-commit
mailing list