mirror of
https://github.com/curl/curl.git
synced 2026-07-26 04:07:17 +03:00
Added --retry and --retry-delay first attempt with four related test cases.
This commit is contained in:
parent
e9b3e1d031
commit
96cf615e9d
7 changed files with 338 additions and 15 deletions
|
|
@ -27,7 +27,7 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
|
|||
test172 test204 test205 test173 test174 test175 test176 test177 \
|
||||
test513 test514 test178 test179 test180 test181 test182 test183 \
|
||||
test184 test185 test186 test187 test188 test189 test191 test192 \
|
||||
test193 test194
|
||||
test193 test194 test195 test196 test197 test198
|
||||
|
||||
# The following tests have been removed from the dist since they no longer
|
||||
# work. We need to fix the test suite's FTPS server first, then bring them
|
||||
|
|
|
|||
30
tests/data/test195
Normal file
30
tests/data/test195
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# Server-side
|
||||
<reply>
|
||||
</reply>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
ftp
|
||||
</server>
|
||||
<name>
|
||||
FTP response 530 after PASS, temporarily not allowed access
|
||||
</name>
|
||||
<command>
|
||||
ftp://%HOSTIP:%FTPPORT/195
|
||||
</command>
|
||||
<file name="log/ftpserver.cmd">
|
||||
REPLY PASS 530 temporarily not available
|
||||
</file>
|
||||
</test>
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<errorcode>
|
||||
10
|
||||
</errorcode>
|
||||
<protocol>
|
||||
USER anonymous
|
||||
PASS curl_by_daniel@haxx.se
|
||||
</protocol>
|
||||
</verify>
|
||||
32
tests/data/test196
Normal file
32
tests/data/test196
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# Server-side
|
||||
<reply>
|
||||
</reply>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
ftp
|
||||
</server>
|
||||
<name>
|
||||
FTP transient error, retry request once
|
||||
</name>
|
||||
<command>
|
||||
ftp://%HOSTIP:%FTPPORT/196 --retry 1
|
||||
</command>
|
||||
<file name="log/ftpserver.cmd">
|
||||
REPLY PASS 530 temporarily not available
|
||||
</file>
|
||||
</test>
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<errorcode>
|
||||
10
|
||||
</errorcode>
|
||||
<protocol>
|
||||
USER anonymous
|
||||
PASS curl_by_daniel@haxx.se
|
||||
USER anonymous
|
||||
PASS curl_by_daniel@haxx.se
|
||||
</protocol>
|
||||
</verify>
|
||||
69
tests/data/test197
Normal file
69
tests/data/test197
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data nocheck=1>
|
||||
HTTP/1.1 503 OK swsbounce
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Content-Length: 21
|
||||
|
||||
server not available
|
||||
</data>
|
||||
<data1 nocheck=1>
|
||||
HTTP/1.1 200 OK
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Content-Length: 3
|
||||
Connection: close
|
||||
|
||||
ok
|
||||
</data1>
|
||||
|
||||
</reply>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
http
|
||||
</server>
|
||||
<name>
|
||||
HTTP GET --retry on 503 error with output to stdout
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/197 --retry 1000
|
||||
</command>
|
||||
</client>
|
||||
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<strip>
|
||||
^User-Agent:.*
|
||||
</strip>
|
||||
<protocol>
|
||||
GET /197 HTTP/1.1
|
||||
Host: 127.0.0.1:%HTTPPORT
|
||||
Pragma: no-cache
|
||||
Accept: */*
|
||||
|
||||
GET /197 HTTP/1.1
|
||||
Host: 127.0.0.1:%HTTPPORT
|
||||
Pragma: no-cache
|
||||
Accept: */*
|
||||
|
||||
</protocol>
|
||||
|
||||
<stdout>
|
||||
HTTP/1.1 503 OK swsbounce
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Content-Length: 21
|
||||
|
||||
server not available
|
||||
HTTP/1.1 200 OK
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Content-Length: 3
|
||||
Connection: close
|
||||
|
||||
ok
|
||||
</stdout>
|
||||
|
||||
</verify>
|
||||
64
tests/data/test198
Normal file
64
tests/data/test198
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data>
|
||||
HTTP/1.1 503 OK swsbounce
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Content-Length: 21
|
||||
|
||||
server not available
|
||||
</data>
|
||||
<data1>
|
||||
HTTP/1.1 200 OK
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Content-Length: 3
|
||||
Connection: close
|
||||
|
||||
ok
|
||||
</data1>
|
||||
|
||||
<datacheck>
|
||||
HTTP/1.1 200 OK
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Content-Length: 3
|
||||
Connection: close
|
||||
|
||||
ok
|
||||
</datacheck>
|
||||
|
||||
</reply>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
http
|
||||
</server>
|
||||
<name>
|
||||
HTTP GET --retry on 503 error with output to file
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/198 --retry 1000
|
||||
</command>
|
||||
</client>
|
||||
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<strip>
|
||||
^User-Agent:.*
|
||||
</strip>
|
||||
<protocol>
|
||||
GET /198 HTTP/1.1
|
||||
Host: 127.0.0.1:%HTTPPORT
|
||||
Pragma: no-cache
|
||||
Accept: */*
|
||||
|
||||
GET /198 HTTP/1.1
|
||||
Host: 127.0.0.1:%HTTPPORT
|
||||
Pragma: no-cache
|
||||
Accept: */*
|
||||
|
||||
</protocol>
|
||||
|
||||
</verify>
|
||||
Loading…
Add table
Add a link
Reference in a new issue