test1635: verify --fail-with-body with --retry

Almost a dupe of 1634

Closes #8847
This commit is contained in:
Daniel Stenberg 2022-05-16 10:04:18 +02:00
parent 0356804d13
commit 3ead914303
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 65 additions and 1 deletions

View File

@ -205,7 +205,7 @@ test1608 test1609 test1610 test1611 test1612 test1613 \
\
test1620 test1621 \
\
test1630 test1631 test1632 test1633 test1634 \
test1630 test1631 test1632 test1633 test1634 test1635 \
\
test1650 test1651 test1652 test1653 test1654 test1655 \
test1660 test1661 \

64
tests/data/test1635 Normal file
View File

@ -0,0 +1,64 @@
<testcase>
<info>
<keywords>
HTTP
HTTP GET
RETRY-AFTER
</keywords>
</info>
#
# Server-side
<reply>
<data nocheck="yes">
HTTP/1.1 429 too many requests swsbounce
Retry-After: 1
Content-Length: 4
moo
</data>
<data1 nocheck="yes">
HTTP/1.1 200 OK
Content-Length: 4
Connection: close
hey
</data1>
</reply>
#
# Client-side
<client>
<server>
http
</server>
<name>
--retry with a 429 response and Retry-After: and --fail-with-body
</name>
<command option="no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER --retry 1 --fail-with-body
</command>
</client>
#
# Verify data after the test has been "shot"
<verify>
<protocol>
GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
</protocol>
<stdout>
moo
hey
</stdout>
</verify>
</testcase>