vtest "None backend allowed"

server s1 {
	rxreq
	txresp

} -start

vinyl v1 -vcl {
	backend default none;
} -start

client c1 {
	txreq
	rxresp
	expect resp.status == 503
} -run

# Test NULL none default backend

vinyl v1 -vcl+backend {
	backend null_backend none;
	backend null_backend_uppercase None;
	sub vcl_recv {
		if (req.url ~ "/no_backend_lowercase") {
			set req.backend_hint = null_backend;
		} else if (req.url ~ "no_backend_uppercase") {
			set req.backend_hint = null_backend_uppercase;
		}
	}
}

client c1 {
	txreq
	rxresp
	expect resp.status == 200

	txreq -url "/no_backend_lowercase"
	rxresp
	expect resp.status == 503

	txreq -url "/no_backend_uppercase"
	rxresp
	expect resp.status == 503
} -run

vinyl v1 -cliok "param.set vcc_feature -err_unref"
vinyl v1 -vcl {
	backend bad { .host = "${bad_backend}"; }
	backend nil none;
}
