Disable wxWebRequest tests using badssl.com

There are DNS problems with resolving it that make the tests fail, see
https://github.com/chromium/badssl.com/issues/500

Require WX_TEST_WEBREQUEST_URL_SELF_SIGNED to be set to the URL to test
instead of hard-coding https://self-signed.badssl.com and don't set this
variable for now to let the tests pass.
This commit is contained in:
Vadim Zeitlin
2022-04-01 15:27:24 +02:00
parent d311c705d7
commit 9501349b14

View File

@@ -323,16 +323,30 @@ TEST_CASE_METHOD(RequestFixture,
TEST_CASE_METHOD(RequestFixture,
"WebRequest::SSL::Error", "[net][webrequest][error]")
{
wxString selfsignedURL;
if ( !wxGetEnv("WX_TEST_WEBREQUEST_URL_SELF_SIGNED", &selfsignedURL) )
{
WARN("Skipping because WX_TEST_WEBREQUEST_URL_SELF_SIGNED is not set.");
return;
}
if (!InitBaseURL())
return;
CreateAbs("https://self-signed.badssl.com/");
CreateAbs(selfsignedURL);
Run(wxWebRequest::State_Failed, 0);
}
TEST_CASE_METHOD(RequestFixture,
"WebRequest::SSL::Ignore", "[net][webrequest]")
{
wxString selfsignedURL;
if ( !wxGetEnv("WX_TEST_WEBREQUEST_URL_SELF_SIGNED", &selfsignedURL) )
{
WARN("Skipping because WX_TEST_WEBREQUEST_URL_SELF_SIGNED is not set.");
return;
}
if (!InitBaseURL())
return;
@@ -346,7 +360,7 @@ TEST_CASE_METHOD(RequestFixture,
}
#endif // __WINDOWS__
CreateAbs("https://self-signed.badssl.com/");
CreateAbs(selfsignedURL);
request.DisablePeerVerify();
Run(wxWebRequest::State_Completed, 200);
}