

vtest "looped backends"

server s1 {
} -start

server s2 {
} -start

server s3 {
} -start

server s4 {
} -start

vinyl v1 -vcl+backend {
	import directors;
	import std;

	sub vcl_init {
		new rr = directors.round_robin();
		rr.add_backend(s1);
		rr.add_backend(s2);
		rr.add_backend(s3);
		rr.add_backend(s4);
		new rr2 = directors.round_robin();
		rr2.add_backend(rr.backend());

		rr.add_backend(rr2.backend());
	}
} -start

vinyl v1 -vcl+backend {
	import directors;
	import std;

	sub vcl_init {
		new rr2 = directors.round_robin();
		rr2.add_backend(s1);
		rr2.add_backend(s2);
		rr2.add_backend(s3);
		rr2.add_backend(s4);
	}
}

vinyl v1 -cliok "vcl.discard vcl1"
vinyl v1 -cliok "vcl.list"
