diff options
author | Brett Stottlemyer <bstottle@ford.com> | 2019-03-06 21:04:26 -0500 |
---|---|---|
committer | Brett Stottlemyer <bstottle@ford.com> | 2019-03-07 14:54:04 +0000 |
commit | 71d55bc57949daa469b12457af73109eb5cfd6b9 (patch) | |
tree | 673f61e69ff23ed8c46bcc02c45456cd69e34127 /tests | |
parent | 7822c7b344d0ce251d221576eaf5824979385732 (diff) |
Fix crash with AllowExternalRegistration and QtRO schema
Using AllowExternalRegistration with a QtRO schema (local, tcp, qnx) does
not support overriding the url, so should not be supported.
Change-Id: I36108a26fcb992bfeb07632eb88c2156e38ccadc
Fixes: QTBUG-73962
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/integration/tst_integration.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/integration/tst_integration.cpp b/tests/auto/integration/tst_integration.cpp index 5c42319..af5cba0 100644 --- a/tests/auto/integration/tst_integration.cpp +++ b/tests/auto/integration/tst_integration.cpp @@ -1384,6 +1384,20 @@ private slots: } + void invalidExternalTest() + { + QFETCH_GLOBAL(QUrl, hostUrl); + if (hostUrl.scheme() != QRemoteObjectStringLiterals::tcp()) + QSKIP("Skipping test for tcp and external backends."); + QRemoteObjectHost srcNode; + QTest::ignoreMessage(QtWarningMsg, " Overriding a valid QtRO url ( QUrl(\"tcp://127.0.0.1:65511\") ) with AllowExternalRegistration is not allowed."); + srcNode.setHostUrl(hostUrl, QRemoteObjectHost::AllowExternalRegistration); + QCOMPARE(srcNode.lastError(), QRemoteObjectNode::HostUrlInvalid); + Engine e; + bool res = srcNode.enableRemoting(&e); + QVERIFY(res == false); + } + }; QTEST_MAIN(tst_Integration) |