mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 11:15:35 -05:00
test: fix expect tests, make them more robust (timeout), correct upload test
This commit is contained in:
parent
dbb384cd82
commit
5aa29fb8b5
5 changed files with 11 additions and 10 deletions
|
|
@ -9,15 +9,15 @@ sleep 0.1
|
|||
|
||||
echo download1 1>&2
|
||||
curl -N "http://localhost:${PORT}/foo_50" -o data21 \
|
||||
-H 'Tranfer-encoding: chunked'
|
||||
-H 'Tranfer-encoding: chunked' --max-time 10
|
||||
|
||||
echo download2 1>&2
|
||||
curl -N "http://localhost:${PORT}/foo_50" -o data22 \
|
||||
-H 'Tranfer-encoding: chunked'
|
||||
-H 'Tranfer-encoding: chunked' --max-time 10
|
||||
|
||||
echo download3 1>&2
|
||||
curl -N "http://localhost:${PORT}/foo_50" -o data23 \
|
||||
-H 'Tranfer-encoding: chunked'
|
||||
-H 'Tranfer-encoding: chunked' --max-time 10
|
||||
|
||||
kill $PID
|
||||
wc data21 data22 data23
|
||||
|
|
|
|||
|
|
@ -6,15 +6,15 @@ PORT=8085
|
|||
"$ECHO" -p $PORT &
|
||||
PID=$!
|
||||
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
|
||||
curl -N "http://localhost:${PORT}/vfs/"
|
||||
curl -N "http://localhost:${PORT}/vfs/" --max-time 5
|
||||
|
||||
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
|
||||
curl -N "http://localhost:${PORT}/vfs/sub/yolo.html"
|
||||
curl -N "http://localhost:${PORT}/vfs/sub/yolo.html" --max-time 5
|
||||
|
||||
kill $PID
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ PORT=8086
|
|||
PID=$!
|
||||
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
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
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
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@ PID=$!
|
|||
|
||||
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
|
||||
wc data
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue