From c0599b3840b8bd69f1aa4267aaba21924d7b50eb Mon Sep 17 00:00:00 2001 From: Jaime Resano Date: Tue, 12 Nov 2024 17:07:26 +0100 Subject: [PATCH] Fix channel options test when no SSL is configured The channel options test should not check the SSL configuration when SSL has not been configured Fixes: QTBUG-131134 Pick-to: 6.8 Change-Id: I6356d0e7b9330a6b5d6830da93d4bb0958f6dcf7 Reviewed-by: Jaime Resano Reviewed-by: Alexey Edelev --- .../grpc/qgrpcchanneloptions/tst_qgrpcchanneloptions.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/auto/grpc/qgrpcchanneloptions/tst_qgrpcchanneloptions.cpp b/tests/auto/grpc/qgrpcchanneloptions/tst_qgrpcchanneloptions.cpp index 63e0eefb..df261c00 100644 --- a/tests/auto/grpc/qgrpcchanneloptions/tst_qgrpcchanneloptions.cpp +++ b/tests/auto/grpc/qgrpcchanneloptions/tst_qgrpcchanneloptions.cpp @@ -21,7 +21,9 @@ private Q_SLOTS: void propertyMetadata() const; void propertyDeadline() const; void propertySerializationFormat() const; +#if QT_CONFIG(ssl) void propertySslConfiguration() const; +#endif void streamsToDebug() const; }; @@ -30,7 +32,10 @@ void QGrpcChannelOptionsTest::hasSpecialMemberFunctions() const QGrpcChannelOptions o1; QVERIFY(!o1.deadlineTimeout()); QVERIFY(o1.metadata().empty()); + +#if QT_CONFIG(ssl) QVERIFY(!o1.sslConfiguration()); +#endif o1.setDeadlineTimeout(100ms); @@ -126,6 +131,7 @@ void QGrpcChannelOptionsTest::propertySerializationFormat() const QCOMPARE_NE(o1.serializationFormat().suffix(), o1Detach.serializationFormat().suffix()); } +#if QT_CONFIG(ssl) void QGrpcChannelOptionsTest::propertySslConfiguration() const { QSslConfiguration sslConfig; @@ -139,6 +145,7 @@ void QGrpcChannelOptionsTest::propertySslConfiguration() const QCOMPARE_EQ(o1.sslConfiguration()->sessionTicket(), sslConfig.sessionTicket()); QCOMPARE_NE(o1.sslConfiguration(), o1Detach.sslConfiguration()); } +#endif void QGrpcChannelOptionsTest::streamsToDebug() const {