diff options
| author | Melvin Keskin <melvo@olomono.de> | 2022-03-07 14:58:29 +0100 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2022-03-07 20:19:29 +0100 |
| commit | ebbf58a05ca112b7e56df8aa072f410398a86dae (patch) | |
| tree | 414f3459888096124d4b3a1846c355ce2d0f290d /tests | |
| parent | 76965a11aa4d230ae8636c67e0e6f9ce20f5ec5c (diff) | |
| download | qxmpp-ebbf58a05ca112b7e56df8aa072f410398a86dae.tar.gz | |
Add parameter 'keyOwnerJid' to trust storages' 'trustLevel()'
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/qxmppatmmanager/tst_qxmppatmmanager.cpp | 8 | ||||
| -rw-r--r-- | tests/qxmpptrustmemorystorage/tst_qxmpptrustmemorystorage.cpp | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/qxmppatmmanager/tst_qxmppatmmanager.cpp b/tests/qxmppatmmanager/tst_qxmppatmmanager.cpp index 215d7e8c..f8a55896 100644 --- a/tests/qxmppatmmanager/tst_qxmppatmmanager.cpp +++ b/tests/qxmppatmmanager/tst_qxmppatmmanager.cpp @@ -1683,6 +1683,7 @@ void tst_QXmppAtmManager::testMakeTrustDecisionsSoleOwnKeyDistrusted() QVERIFY2(!unexpectedTrustMessageSentSpy.wait(UNEXPECTED_TRUST_MESSAGE_WAITING_TIMEOUT), "Unexpected trust message sent!"); auto futureTrustLevel = m_trustStorage->trustLevel(ns_omemo, + QStringLiteral("alice@example.org"), QByteArray::fromBase64(QByteArrayLiteral("RwyI/3m9l4wgju9JduFxb5MEJvBNRDfPfo1Ewhl1DEI="))); QVERIFY(futureTrustLevel.isFinished()); auto result = futureTrustLevel.result(); @@ -2026,6 +2027,7 @@ void tst_QXmppAtmManager::testMakeTrustDecisionsSoleContactKeyDistrusted() QVERIFY2(!unexpectedTrustMessageSentSpy.wait(UNEXPECTED_TRUST_MESSAGE_WAITING_TIMEOUT), "Unexpected trust message sent!"); const auto futureTrustLevel = m_trustStorage->trustLevel(ns_omemo, + QStringLiteral("bob@example.com"), QByteArray::fromBase64(QByteArrayLiteral("+1VJvMLCGvkDquZ6mQZ+SS+gTbQ436BJUwFOoW0Ma1g="))); QVERIFY(futureTrustLevel.isFinished()); const auto result = futureTrustLevel.result(); @@ -2035,18 +2037,21 @@ void tst_QXmppAtmManager::testMakeTrustDecisionsSoleContactKeyDistrusted() void tst_QXmppAtmManager::testMakeTrustDecisionsOwnKeysDone() { auto future = m_trustStorage->trustLevel(ns_omemo, + QStringLiteral("alice@example.org"), QByteArray::fromBase64(QByteArrayLiteral("0RcVsGk3LnpEFsqqztTzAgCDgVXlfa03paSqJFOOWOU="))); QVERIFY(future.isFinished()); auto result = future.result(); QCOMPARE(result, QXmppTrustStorage::Authenticated); future = m_trustStorage->trustLevel(ns_omemo, + QStringLiteral("alice@example.org"), QByteArray::fromBase64(QByteArrayLiteral("tYn/wcIOxBSoW4W1UfPr/zgbLipBK2KsFfC7F1bzut0="))); QVERIFY(future.isFinished()); result = future.result(); QCOMPARE(result, QXmppTrustStorage::Authenticated); future = m_trustStorage->trustLevel(ns_omemo, + QStringLiteral("alice@example.org"), QByteArray::fromBase64(QByteArrayLiteral("4iBsyJPVAfNWM/OgyA9fasOvkJ8K1/0wuYpwVGw4Q5M="))); QVERIFY(future.isFinished()); result = future.result(); @@ -2056,18 +2061,21 @@ void tst_QXmppAtmManager::testMakeTrustDecisionsOwnKeysDone() void tst_QXmppAtmManager::testMakeTrustDecisionsContactKeysDone() { auto future = m_trustStorage->trustLevel(ns_omemo, + QStringLiteral("bob@example.com"), QByteArray::fromBase64(QByteArrayLiteral("+1VJvMLCGvkDquZ6mQZ+SS+gTbQ436BJUwFOoW0Ma1g="))); QVERIFY(future.isFinished()); auto result = future.result(); QCOMPARE(result, QXmppTrustStorage::Authenticated); future = m_trustStorage->trustLevel(ns_omemo, + QStringLiteral("bob@example.com"), QByteArray::fromBase64(QByteArrayLiteral("mzDeKTQBVm1cTmzF9DjCGKa14pDADZOVLT9Kh7CK7AM="))); QVERIFY(future.isFinished()); result = future.result(); QCOMPARE(result, QXmppTrustStorage::Authenticated); future = m_trustStorage->trustLevel(ns_omemo, + QStringLiteral("bob@example.com"), QByteArray::fromBase64(QByteArrayLiteral("8gBTC1fspYkO4akS6QKN+XFA9Nmf9NEIg7hjtlpTjII="))); QVERIFY(future.isFinished()); result = future.result(); diff --git a/tests/qxmpptrustmemorystorage/tst_qxmpptrustmemorystorage.cpp b/tests/qxmpptrustmemorystorage/tst_qxmpptrustmemorystorage.cpp index ff7537dc..cebe886f 100644 --- a/tests/qxmpptrustmemorystorage/tst_qxmpptrustmemorystorage.cpp +++ b/tests/qxmpptrustmemorystorage/tst_qxmpptrustmemorystorage.cpp @@ -523,6 +523,7 @@ void tst_QXmppTrustMemoryStorage::testTrustLevels() auto future = m_trustStorage.trustLevel( ns_omemo, + QStringLiteral("alice@example.org"), QByteArray::fromBase64(QByteArrayLiteral("AZ/cF4OrUOILKO1gQBf62pQevOhBJ2NyHnXLwM4FDZU="))); QVERIFY(future.isFinished()); auto result = future.result(); @@ -538,6 +539,7 @@ void tst_QXmppTrustMemoryStorage::testTrustLevels() future = m_trustStorage.trustLevel( ns_omemo, + QStringLiteral("alice@example.org"), QByteArray::fromBase64(QByteArrayLiteral("AZ/cF4OrUOILKO1gQBf62pQevOhBJ2NyHnXLwM4FDZU="))); QVERIFY(future.isFinished()); result = future.result(); @@ -545,6 +547,7 @@ void tst_QXmppTrustMemoryStorage::testTrustLevels() future = m_trustStorage.trustLevel( ns_omemo, + QStringLiteral("bob@example.com"), QByteArray::fromBase64(QByteArrayLiteral("9E51lG3vVmUn8CM7/AIcmIlLP2HPl6Ao0/VSf4VT/oA="))); QVERIFY(future.isFinished()); result = future.result(); @@ -560,6 +563,7 @@ void tst_QXmppTrustMemoryStorage::testTrustLevels() future = m_trustStorage.trustLevel( ns_omemo, + QStringLiteral("alice@example.org"), QByteArray::fromBase64(QByteArrayLiteral("9w6oPjKyGSALd9gHq7sNOdOAkD5bHUVOKACNs89FjkA="))); QVERIFY(future.isFinished()); result = future.result(); @@ -569,6 +573,7 @@ void tst_QXmppTrustMemoryStorage::testTrustLevels() // The default value is returned. future = m_trustStorage.trustLevel( ns_omemo, + QStringLiteral("alice@example.org"), QByteArray::fromBase64(QByteArrayLiteral("WXL4EDfzUGbVPQWjT9pmBeiCpCBzYZv3lUAaj+UbPyE="))); QVERIFY(future.isFinished()); result = future.result(); @@ -585,6 +590,7 @@ void tst_QXmppTrustMemoryStorage::testTrustLevels() future = m_trustStorage.trustLevel( ns_omemo, + QStringLiteral("alice@example.org"), QByteArray::fromBase64(QByteArrayLiteral("AZ/cF4OrUOILKO1gQBf62pQevOhBJ2NyHnXLwM4FDZU="))); QVERIFY(future.isFinished()); result = future.result(); @@ -592,6 +598,7 @@ void tst_QXmppTrustMemoryStorage::testTrustLevels() future = m_trustStorage.trustLevel( ns_omemo, + QStringLiteral("bob@example.com"), QByteArray::fromBase64(QByteArrayLiteral("9E51lG3vVmUn8CM7/AIcmIlLP2HPl6Ao0/VSf4VT/oA="))); QVERIFY(future.isFinished()); result = future.result(); @@ -600,6 +607,7 @@ void tst_QXmppTrustMemoryStorage::testTrustLevels() // Verify that the default trust level is returned for an unknown key. future = m_trustStorage.trustLevel( ns_omemo, + QStringLiteral("alice@example.org"), QByteArray::fromBase64(QByteArrayLiteral("wE06Gwf8f4DvDLFDoaCsGs8ibcUjf84WIOA2FAjPI3o="))); QVERIFY(future.isFinished()); result = future.result(); |
