desktop/qa/desktop_lib/test_desktop_lib.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit f7eff4319be741143f6d8d5e0f2995e3ce46b126 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon Jul 13 17:51:49 2020 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Tue Jul 14 01:58:11 2020 +0200 CppunitTest_desktop_lib: handle SignatureState::OK after loading The purpose of DesktopLOKTest::testGetSignatureState_Signed() is to make sure that in case we don't trust a cert and we add the necessary CAs, then we trust the cert. So just return early when we trust the cert already, it's not an interesting failure. Change-Id: I32f24b5464a0e14156292de2acda562025ded73f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98673 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 4eeb728599b7..5b6947f93eaf 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -2411,6 +2411,12 @@ void DesktopLOKTest::testGetSignatureState_Signed() Scheduler::ProcessEventsToIdle(); pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}"); int nState = pDocument->m_pDocumentClass->getSignatureState(pDocument); + if (nState == 1) + { + // Already SignatureState::OK, then can't test the effect of trusting new CAs. + return; + } + CPPUNIT_ASSERT_EQUAL(int(4), nState); std::vector<unsigned char> aCertificate; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits