]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
test1188: change error from connect to resolve error
authorDaniel Stenberg <daniel@haxx.se>
Thu, 18 Feb 2021 07:30:35 +0000 (08:30 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 18 Feb 2021 10:10:47 +0000 (11:10 +0100)
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

tests/data/test1188

index d2e741e4d9df0ca9c1178a1d54ee783a5c7c6024..8912b391a94cdbd4e880d162050b5f8b2c820c8c 100644 (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: */*
 \r
 </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>