Test two pipe VDPs in a row

parent ba3d530a
#!/bin/sh
while read line
do
echo $line
sleep 1
echo append $1
done
echo final $1
exit 0
# looks like -*- vcl -*-
varnishtest "vdp pipe append"
server s1 {
rxreq
txresp -body {foo bar baz quux
}
} -start
varnish v1 -arg "-p debug=+syncvsl" -vcl+backend {
import ${vmod_pipe};
sub vcl_init {
new app1 = pipe.vdp("${testdir}/append.sh", timeout=10s);
app1.arg("1");
new app2 = pipe.vdp("${testdir}/append.sh", timeout=10s);
app2.arg("2");
}
sub vcl_backend_response {
set beresp.uncacheable = true;
}
sub vcl_deliver {
set resp.filters = "app1 app2";
}
} -start
client c1 {
txreq
rxresp
expect resp.status == 200
expect resp.body == {foo bar baz quux
append 2
append 1
append 2
final 1
append 2
final 2
}
} -run
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