test: fix expect tests, make them more robust (timeout), correct upload test

This commit is contained in:
Simon Cruanes 2022-03-31 08:44:20 -04:00
parent dbb384cd82
commit 5aa29fb8b5
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
5 changed files with 11 additions and 10 deletions

View file

@ -9,15 +9,15 @@ sleep 0.1
echo download1 1>&2 echo download1 1>&2
curl -N "http://localhost:${PORT}/foo_50" -o data21 \ curl -N "http://localhost:${PORT}/foo_50" -o data21 \
-H 'Tranfer-encoding: chunked' -H 'Tranfer-encoding: chunked' --max-time 10
echo download2 1>&2 echo download2 1>&2
curl -N "http://localhost:${PORT}/foo_50" -o data22 \ curl -N "http://localhost:${PORT}/foo_50" -o data22 \
-H 'Tranfer-encoding: chunked' -H 'Tranfer-encoding: chunked' --max-time 10
echo download3 1>&2 echo download3 1>&2
curl -N "http://localhost:${PORT}/foo_50" -o data23 \ curl -N "http://localhost:${PORT}/foo_50" -o data23 \
-H 'Tranfer-encoding: chunked' -H 'Tranfer-encoding: chunked' --max-time 10
kill $PID kill $PID
wc data21 data22 data23 wc data21 data22 data23

View file

@ -6,15 +6,15 @@ PORT=8085
"$ECHO" -p $PORT & "$ECHO" -p $PORT &
PID=$! PID=$!
sleep 0.1 sleep 0.1
curl -N "http://localhost:${PORT}/echo/?a=b&c=d" -H user-agent:test curl -N "http://localhost:${PORT}/echo/?a=b&c=d" -H user-agent:test --max-time 5
sleep 0.1 sleep 0.1
curl -N "http://localhost:${PORT}/vfs/" curl -N "http://localhost:${PORT}/vfs/" --max-time 5
sleep 0.1 sleep 0.1
curl -N "http://localhost:${PORT}/vfs/a.txt" curl -N "http://localhost:${PORT}/vfs/a.txt" --max-time 5
sleep 0.1 sleep 0.1
curl -N "http://localhost:${PORT}/vfs/sub/yolo.html" curl -N "http://localhost:${PORT}/vfs/sub/yolo.html" --max-time 5
kill $PID kill $PID

View file

@ -7,5 +7,5 @@ PORT=8086
PID=$! PID=$!
sleep 0.1 sleep 0.1
curl -N "http://localhost:${PORT}/count/10" -H user-agent:test curl -N "http://localhost:${PORT}/count/10" -H user-agent:test --max-time 10
kill $PID kill $PID

View file

@ -1,2 +1,2 @@
serve directory . on http://127.0.0.1:8087 serve directory . on http://127.0.0.1:8087
server error: Invalid_argument("Bytes.blit")0 0 0 data upload successful 0 0 52428800 data

View file

@ -10,7 +10,8 @@ PID=$!
sleep 0.1 sleep 0.1
cat foo_50 | curl -N -X PUT http://localhost:$PORT/data --data-binary @- -H 'Transfer-Encoding: chunked' cat foo_50 | curl -N -X PUT http://localhost:$PORT/data --data-binary @- \
-H 'Transfer-Encoding: chunked' --max-time 10
kill $PID kill $PID
wc data wc data