1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

test1188: change error from connect to resolve error

Using the %NOLISTENPORT to trigger a connection failure is somewhat
"risky" (since it isn't guaranteed to not be listened to) and caused
occasional CI problems. This fix changes the infused error to be a more
reliable one but still verifies the --write-out functionality properly -
which is the purpose of this test.

Reported-by: Jay Satiro
Fixes #6621
Closes #6623
This commit is contained in:
Daniel Stenberg 2021-02-18 08:30:35 +01:00
parent 6174fc993a
commit 35ca04ce1b
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -27,7 +27,7 @@ http
--write-out with %{onerror} and %{urlnum} to stderr
</name>
<command>
http://%HOSTIP:%NOLISTENPORT/we/want/our/1188 http://%HOSTIP:%HTTPPORT/we/want/our/1188 -w '%{onerror}%{stderr}%{urlnum} says %{exitcode} %{errormsg}\n' -s
http://non-existing-host.haxx.se:%NOLISTENPORT/we/want/our/1188 http://%HOSTIP:%HTTPPORT/we/want/our/1188 -w '%{onerror}%{stderr}%{urlnum} says %{exitcode} %{errormsg}\n' -s
</command>
</client>
@ -41,7 +41,7 @@ Accept: */*
</protocol>
<stderr mode="text">
0 says 7 Failed to connect to %HOSTIP port %NOLISTENPORT: Connection refused
0 says 6 Could not resolve host: non-existing-host.haxx.se
</stderr>
</verify>
</testcase>