vtest "Check set resp.body in vcl_synth"

vinyl v1 -arg "-sTransient=debug,lessspace" -vcl {
	backend foo {
		.host = "${bad_backend}";
	}
	sub vcl_recv {
		return (synth(888));
	}

	sub vcl_synth {
		set resp.body = "Custom vcl_synth's body";
		return (deliver);
	}
} -start

client c1 {
	txreq -url "/"
	rxresp
	expect resp.status == 888
	expect resp.http.connection != close
	expect resp.bodylen == 23
	expect resp.body == "Custom vcl_synth's body"
} -run

vinyl v1 -expect s_synth == 1
