tst_QNetworkReply: add more checks for blocking keychain

There are more tests that create TLS server and can potentially
fail in case SecureTransport backend is in use.

Pick-to: 6.8
Task-number: QTBUG-130500
Change-Id: Iaf2071c19f3cc0d3617bfc8c484b464c1a212d5a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Timur Pocheptsov 2024-11-06 09:41:09 +01:00
parent 057c405bdd
commit 81e7d3f95a
2 changed files with 10 additions and 1 deletions

View File

@ -11,7 +11,6 @@ opensuse-leap
b2qt
ubuntu
windows-10
macos-15 # QTBUG-130500
[putToFtp]
windows-10
[backgroundRequest]

View File

@ -5617,6 +5617,9 @@ void tst_QNetworkReply::ioPostToHttpsUploadProgress()
{
//QFile sourceFile(testDataDir + "/bigfile");
//QVERIFY(sourceFile.open(QIODevice::ReadOnly));
if (QtNetworkTestHelpers::isSecureTransportBlockingTest())
QSKIP("SecureTransport: temporary keychain is not working on this version of macOS");
qint64 wantedSize = 2*1024*1024; // 2 MB
QByteArray sourceFile;
// And in the case of SSL, the compression can fool us and let the
@ -9146,6 +9149,9 @@ void tst_QNetworkReply::ioHttpRedirectErrors()
QFETCH(QNetworkReply::NetworkError, error);
QUrl localhost(url);
if (localhost.scheme() == QLatin1String("https") && QtNetworkTestHelpers::isSecureTransportBlockingTest())
QSKIP("SecureTransport: temporary keychain is not working on this version of macOS");
MiniHttpServer server("", localhost.scheme() == QLatin1String("https"));
localhost.setPort(server.serverPort());
@ -9222,6 +9228,8 @@ void tst_QNetworkReply::ioHttpRedirectPolicy()
QFETCH(const QNetworkRequest::RedirectPolicy, policy);
QFETCH(const bool, ssl);
if (ssl && QtNetworkTestHelpers::isSecureTransportBlockingTest())
QSKIP("SecureTransport: temporary keychain is not working on this version of macOS");
QFETCH(const int, redirectCount);
QFETCH(const int, statusCode);
@ -9304,6 +9312,8 @@ void tst_QNetworkReply::ioHttpRedirectPolicyErrors()
QVERIFY(policy != QNetworkRequest::ManualRedirectPolicy);
QFETCH(const bool, ssl);
if (ssl && QtNetworkTestHelpers::isSecureTransportBlockingTest())
QSKIP("SecureTransport: temporary keychain is not working on this version of macOS");
QFETCH(const QString, location);
QFETCH(const int, maxRedirects);
QFETCH(const QNetworkReply::NetworkError, expectedError);