Refactor vtc: prep for different json sources

parent b09ecc80
......@@ -66,15 +66,19 @@ varnish v1 -vcl+backend {
}
sub vcl_synth {
set resp.http.fail = p_test.parse(req.http.not);
set resp.http.parse =
p_test.parse({"{ a: 1, b: "hi there", c: true, d: false, "} +
{" e : null, f: [ 1, -2, 3], g: { "1": [], h: [ 7 ] } } "});
if (req.url == "/static") {
set resp.http.parse =
p_test.parse(
{"{ a: 1, b: "hi there", c: true, d: false, "} +
{" e : null, f: [ 1, -2, 3], g: { "1": [], h"} +
{": [ 7 ] } } "});
}
call extract;
}
} -start
client c1 {
txreq
txreq -url "/static"
rxresp
expect resp.status == 200
expect resp.http.fail == false
......
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