Commit 4703c26f authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Test more of the fallback director

parent dfee06d5
......@@ -16,6 +16,7 @@ server s3 {
} -start
varnish v1 -vcl+backend {
import std;
import directors;
sub vcl_init {
......@@ -33,11 +34,17 @@ varnish v1 -vcl+backend {
return (pass);
}
sub vcl_deliver {
set resp.http.health = std.healthy(fb1.backend());
}
sub vcl_backend_fetch {
set bereq.backend = fb1.backend();
}
} -start
varnish v1 -cliok "param.set debug +vclrel"
varnish v1 -cliok "backend.set_health s1 sick"
varnish v1 -cliok "backend.set_health s2 sick"
......@@ -48,6 +55,8 @@ client c1 {
expect resp.http.foo == "3"
} -run
varnish v1 -vsl_catchup
varnish v1 -cliok "backend.set_health s2 healthy"
client c1 {
......@@ -56,6 +65,8 @@ client c1 {
expect resp.http.foo == "2"
} -run
varnish v1 -vsl_catchup
varnish v1 -cliok "backend.set_health s1 healthy"
client c1 {
......@@ -64,6 +75,8 @@ client c1 {
expect resp.http.foo == "1"
} -run
varnish v1 -vsl_catchup
varnish v1 -cliok "backend.set_health s1 sick"
server s3 -start
......@@ -75,3 +88,15 @@ client c1 {
rxresp
expect resp.http.foo == "3"
} -run
varnish v1 -vsl_catchup
varnish v1 -vcl+backend {
sub vcl_recv {
set req.backend_hint = s1;
set req.backend_hint = s2;
set req.backend_hint = s3;
}
}
varnish v1 -cliok "vcl.discard vcl1"
varnish v1 -cliok "vcl.list"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment