Commit 61ff6dbc authored by Dridi Boukelmoune's avatar Dridi Boukelmoune Committed by guillaume quintard

Allow shell and err_shell commands in a stream too

parent 4d3baa90
......@@ -3,9 +3,14 @@ varnishtest "Write a body to a file"
server s1 {
fatal
stream 1 {
# First, HTTP checks
rxreq
expect req.http.Content-Type == "text/plain"
# Then, payload checks
write_body req.txt
shell {grep -q request req.txt}
txresp -hdr Content-Type text/plain -body response
} -run
......@@ -15,13 +20,15 @@ client c1 -connect ${s1_sock} {
fatal
stream 1 {
txreq -req POST -hdr Content-Type text/plain -body request
# First, HTTP checks
rxresp
expect resp.http.Content-Type == "text/plain"
# Then, payload checks
write_body resp.txt
shell {grep -q response resp.txt}
} -run
} -run
server s1 -wait
shell {grep -q request req.txt}
shell {grep -q response resp.txt}
......@@ -2530,6 +2530,8 @@ static const struct cmds stream_cmds[] = {
/* general purpose */
CMD(barrier)
CMD(delay)
CMD(err_shell)
CMD(shell)
{ NULL, NULL }
#undef CMD_STREAM
#undef CMD
......
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