summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/access
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2020-12-01 17:22:18 +0100
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2020-12-02 17:39:06 +0100
commit89734289d53020ac963e9ab098fc89d0ea3c0783 (patch)
tree7cddd56795892fcc669cc5a6128381aaef7ce673 /tests/auto/network/access
parentdcb10dfe8125970409efd5eeee1289534b4a73e7 (diff)
tst_qnetworkreply: cleanup BLACKLIST
Which contains a lot of 'macos'/'osx' black-listed auto-tests. They mostly fail with SecureTransport (on BigSur) because SecTrustEvaluate() does not like our old certificate. Instead, since SecureTransport is deprecated anyway and we are not planning to develop it in future, skip the related auto-test depending on QT_CONFIG(securetransport). Task-number: QTBUG-88943 Change-Id: I5f6cb7b2d0ea15c445603c1ff3e1700f123c28d1 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tests/auto/network/access')
-rw-r--r--tests/auto/network/access/qnetworkreply/BLACKLIST18
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp28
2 files changed, 27 insertions, 19 deletions
diff --git a/tests/auto/network/access/qnetworkreply/BLACKLIST b/tests/auto/network/access/qnetworkreply/BLACKLIST
index 51a662db11..4f356a8596 100644
--- a/tests/auto/network/access/qnetworkreply/BLACKLIST
+++ b/tests/auto/network/access/qnetworkreply/BLACKLIST
@@ -48,18 +48,12 @@ macos
macos
[downloadProgress]
macos
-[encrypted]
-macos
[httpCanReadLine]
macos
[httpRecursiveCreation]
osx
[httpWithNoCredentialUsage]
macos
-[ignoreSslErrorsList]
-osx
-[ignoreSslErrorsListWithSlot]
-osx
[ioGetFromBuiltinHttp]
osx
[ioGetFromHttp]
@@ -84,18 +78,10 @@ macos
macos
[postToHttpSynchronous]
macos
-[postToHttps]
-osx
-[postToHttpsMultipart]
-osx
-[postToHttpsSynchronous]
-osx
[putGetDeleteGetFromHttp]
macos
[putToHttpSynchronous]
macos
-[putToHttps]
-osx
[putToHttpsSynchronous]
osx
[putWithRateLimiting]
@@ -112,9 +98,5 @@ osx
osx
[sendCustomRequestToHttp]
macos
-[sslConfiguration]
-osx
-[synchronousRequest]
-osx
[backgroundRequestConnectInBackground]
osx
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 08e9dd581d..fb64eedc58 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -2782,6 +2782,9 @@ void tst_QNetworkReply::putToHttpMultipart()
#ifndef QT_NO_SSL
void tst_QNetworkReply::putToHttps_data()
{
+#if QT_CONFIG(securetransport)
+ QSKIP("SecTrustEvaluate() returns recoverable error, update the certificate on server");
+#endif
uniqueExtension = createUniqueExtension();
putToFile_data();
}
@@ -2823,6 +2826,9 @@ void tst_QNetworkReply::putToHttps()
void tst_QNetworkReply::putToHttpsSynchronous_data()
{
+#if QT_CONFIG(securetransport)
+ QSKIP("SecTrustEvalueate() retruns recoverable error, update the server's certificate");
+#endif
uniqueExtension = createUniqueExtension();
putToFile_data();
}
@@ -2868,6 +2874,9 @@ void tst_QNetworkReply::putToHttpsSynchronous()
void tst_QNetworkReply::postToHttps_data()
{
+#if QT_CONFIG(securetransport)
+ QSKIP("SecTrustEvaluate() returns recoverable error, update the certificate on server");
+#endif
putToFile_data();
}
@@ -2899,6 +2908,9 @@ void tst_QNetworkReply::postToHttps()
void tst_QNetworkReply::postToHttpsSynchronous_data()
{
+#if QT_CONFIG(securetransport)
+ QSKIP("SecTrustEvaluate() returns recoverable error, update the certificate on server");
+#endif
putToFile_data();
}
@@ -2935,6 +2947,9 @@ void tst_QNetworkReply::postToHttpsSynchronous()
void tst_QNetworkReply::postToHttpsMultipart_data()
{
+#if QT_CONFIG(securetransport)
+ QSKIP("SecTrustEvaluate() returns recoverable error, update the certificate on server");
+#endif
postToHttpMultipart_data();
}
@@ -6453,16 +6468,23 @@ void tst_QNetworkReply::sslConfiguration_data()
QTest::newRow("empty") << QSslConfiguration() << false;
QSslConfiguration conf = QSslConfiguration::defaultConfiguration();
QTest::newRow("default") << conf << false; // does not contain test server cert
+#if QT_CONFIG(securetransport)
+ qWarning("SecTrustEvaluate() will fail, update the certificate on server");
+#else
QList<QSslCertificate> testServerCert = QSslCertificate::fromPath(testDataDir + certsFilePath);
conf.setCaCertificates(testServerCert);
+
QTest::newRow("set-root-cert") << conf << true;
conf.setProtocol(QSsl::SecureProtocols);
QTest::newRow("secure") << conf << true;
+#endif
}
void tst_QNetworkReply::encrypted()
{
- qDebug() << QtNetworkSettings::httpServerName();
+#if QT_CONFIG(securetransport)
+ QSKIP("SecTrustEvalute() fails with old server certificate");
+#endif
QUrl url("https://" + QtNetworkSettings::httpServerName());
QNetworkRequest request(url);
QNetworkReply *reply = manager.get(request);
@@ -7731,12 +7753,16 @@ void tst_QNetworkReply::synchronousRequest_data()
<< QString("text/plain");
#ifndef QT_NO_SSL
+#if QT_CONFIG(securetransport)
+ qWarning("Skipping https scheme, SecTrustEvalue() fails, update the certificate on server");
+#else
QTest::newRow("https")
<< QUrl("https://" + QtNetworkSettings::httpServerName() + "/qtest/rfc3252.txt")
<< QString("file:" + testDataDir + "/rfc3252.txt")
<< true
<< QString("text/plain");
#endif
+#endif
QTest::newRow("data")
<< QUrl(QString::fromLatin1("data:text/plain,hello world"))