. ./test-lib.sh test -r random_blob || die "random_blob required, run with 'make $0'" echo "input trailer test model=$model" eval $(unused_listen) rtmpfiles unicorn_config tmp r_err r_out pid fifo ok cat > $unicorn_config < $tmp & wait echo ok > $ok ) | socat - TCP:$listen | utee $fifo fgrep 'HTTP/1.1 200 OK' $tmp test xok = x"$(cat $ok)" check_stderr echo "big blob" ( content-md5-put < random_blob cat $fifo > $tmp & wait echo ok > $ok ) | socat - TCP:$listen | utee $fifo fgrep 'HTTP/1.1 200 OK' $tmp test xok = x"$(cat $ok)" check_stderr echo "staggered blob" ( ( dd bs=164 count=1 < random_blob sleep 2 dd bs=4545 count=1 < random_blob sleep 2 dd bs=1234 count=1 < random_blob echo ok > $ok ) 2>/dev/null | content-md5-put test xok = x"$(cat $ok)" cat $fifo > $tmp & wait echo ok > $ok ) | socat - TCP:$listen | utee $fifo fgrep 'HTTP/1.1 200 OK' $tmp test xok = x"$(cat $ok)" check_stderr kill $(cat $pid)