aboutsummaryrefslogtreecommitdiffstats
path: root/lang/qt/tests (follow)
Commit message (Collapse)AuthorAgeFilesLines
* qt: Add API to get the context for a JobAndre Heinecke2016-11-141-0/+4
| | | | | | | | | | | | | | | | | | | | * lang/qt/src/job.cpp, lang/qt/src/job.h (Job::context): New. * lang/qt/src/threadedjobmixin.cpp (ThreadedJobMixin::~ThreadedJobMixin): New. Unregister context. (ThreadedJobMixin::lateInitialization): Register context. * NEWS: Update for cpp and qt. -- The global map hack is necessary because the job class does not know about the context which is held in threadedjobmixin. Adding a virtual function in Job would be an ABI break which I'd like to avoid at this point. Although QGpgME's API will need a big ABI break to make it ABI maintainable. The virtual jobs -> implementation classes are nearly unmaintainable ABI wise. The context is exposed to provide more flexibility to users, e.g. to add a passphrase callback or to set the sender in a context.
* qt: Add simple verify testAndre Heinecke2016-10-102-3/+97
| | | | | | * lang/qt/tests/t-verify.cpp: New. Small test if a signature returns a key with fingerprint. * lang/qt/tests/Makefile.am: Add new test.
* qt: Fix spelling error in WKSPublishJobAndre Heinecke2016-10-051-2/+2
| | | | | | | | | | | | | | | | * src/qgpgmewkspublishjob.cpp, src/qgpgmewkspublishjob.h, src/wkspublishjob.h, tests/t-wkspublish.cpp: Fix spelling of received. * src/configure.ac (LIBQGPGME_LT_CURRENT): Bump accordingly. -- While this is an API break I've decided to fix this now instead of deprecating / keeping it around forever in the API. The only known users of QGpgME are KDE Applications and there it is not yet used.
* qt: Disable tests that require a password for 2.0Andre Heinecke2016-10-051-0/+26
| | | | | | | | | | | * lang/qt/tests/t-encrypt.cpp: Disable tests that require a password for 2.0. -- The passphrase_cb apparently does not work with 2.0 so we would need a fake pinentry to get this to work. We just disable the test instead as this is a rarely used feature and works with 1.4 and 2.1.
* qt: Fix unused variable warningsAndre Heinecke2016-10-053-11/+11
| | | | | | | | * qt/src/qgpgmenewcryptoconfig.cpp, qt/src/threadedjobmixin.h, qt/tests/t-encrypt.cpp, qt/tests/t-support.h, qt/tests/t-wkspublish.cpp: Mark additional variables as unused.
* qt: Disable t-wkspublish testAndre Heinecke2016-10-051-1/+1
| | | | | | | | | * lang/qt/tests/Makefile.am (TESTS): Remove t-wkspublish. -- Even the only enabled test did a connection to localhost this might fail if it is stalled and is an outside factor. It also might be disturbing other services locally.
* cpp, qt: Include config.hAndre Heinecke2016-09-238-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lang/cpp/src/callbacks.cpp, lang/cpp/src/configuration.cpp, lang/cpp/src/context.cpp, lang/cpp/src/context_glib.cpp, lang/cpp/src/context_qt.cpp, lang/cpp/src/context_vanilla.cpp, lang/cpp/src/data.cpp, lang/cpp/src/decryptionresult.cpp, lang/cpp/src/defaultassuantransaction.cpp, lang/cpp/src/editinteractor.cpp, lang/cpp/src/encryptionresult.cpp, lang/cpp/src/engineinfo.cpp, lang/cpp/src/eventloopinteractor.cpp, lang/cpp/src/exception.cpp, lang/cpp/src/gpgadduserideditinteractor.cpp, lang/cpp/src/gpgagentgetinfoassuantransaction.cpp, lang/cpp/src/gpgsetexpirytimeeditinteractor.cpp, lang/cpp/src/gpgsetownertrusteditinteractor.cpp, lang/cpp/src/gpgsignkeyeditinteractor.cpp, lang/cpp/src/importresult.cpp, lang/cpp/src/key.cpp, lang/cpp/src/keygenerationresult.cpp, lang/cpp/src/keylistresult.cpp, lang/cpp/src/scdgetinfoassuantransaction.cpp, lang/cpp/src/signingresult.cpp, lang/cpp/src/tofuinfo.cpp, lang/cpp/src/trustitem.cpp, lang/cpp/src/verificationresult.cpp, lang/cpp/src/vfsmountresult.cpp, lang/qt/src/dataprovider.cpp, lang/qt/src/defaultkeygenerationjob.cpp, lang/qt/src/gpgme_backend_debug.cpp, lang/qt/src/job.cpp, lang/qt/src/qgpgmeadduseridjob.cpp, lang/qt/src/qgpgmebackend.cpp, lang/qt/src/qgpgmechangeexpiryjob.cpp, lang/qt/src/qgpgmechangeownertrustjob.cpp, lang/qt/src/qgpgmechangepasswdjob.cpp, lang/qt/src/qgpgmedecryptjob.cpp, lang/qt/src/qgpgmedecryptverifyjob.cpp, lang/qt/src/qgpgmedeletejob.cpp, lang/qt/src/qgpgmedownloadjob.cpp, lang/qt/src/qgpgmeencryptjob.cpp, lang/qt/src/qgpgmeexportjob.cpp, lang/qt/src/qgpgmeimportfromkeyserverjob.cpp, lang/qt/src/qgpgmeimportjob.cpp, lang/qt/src/qgpgmekeyformailboxjob.cpp, lang/qt/src/qgpgmekeygenerationjob.cpp, lang/qt/src/qgpgmekeylistjob.cpp, lang/qt/src/qgpgmelistallkeysjob.cpp, lang/qt/src/qgpgmenewcryptoconfig.cpp, lang/qt/src/qgpgmerefreshkeysjob.cpp, lang/qt/src/qgpgmesecretkeyexportjob.cpp, lang/qt/src/qgpgmesignencryptjob.cpp, lang/qt/src/qgpgmesignjob.cpp, lang/qt/src/qgpgmesignkeyjob.cpp, lang/qt/src/qgpgmetofupolicyjob.cpp, lang/qt/src/qgpgmeverifydetachedjob.cpp, lang/qt/src/qgpgmeverifyopaquejob.cpp, lang/qt/src/qgpgmewkspublishjob.cpp, lang/qt/src/threadedjobmixin.cpp, lang/qt/tests/run-keyformailboxjob.cpp, lang/qt/tests/t-encrypt.cpp, lang/qt/tests/t-keylist.cpp, lang/qt/tests/t-keylocate.cpp, lang/qt/tests/t-ownertrust.cpp, lang/qt/tests/t-support.cpp, lang/qt/tests/t-tofuinfo.cpp, lang/qt/tests/t-wkspublish.cpp: Include config.h -- This fixes problems with mismatching definitions. Most notably _FILE_OFFSET_BITS is now always set correctly.
* tests: Improve portability.Werner Koch2016-09-201-1/+1
| | | | | | | | * lang/qt/tests/Makefile.am (clean-local): Avoid non-portable "--" * lang/python/Makefile.am (copystamp): Use well defined cp -R instead of cp -r. Signed-off-by: Werner Koch <[email protected]>
* qt: Add debug output for testTofuPolicyAndre Heinecke2016-09-191-0/+20
| | | | | | | | | | * lang/qt/tests/t-tofuinfo.cpp (testTofuPolicy): Add debug output. -- The debug output is only emitted before a failure of the test in case a keylisting of [email protected] fails which it should never do.
* qt: Add test for setting tofu policyAndre Heinecke2016-09-161-0/+36
| | | | * lang/qt/tests/t-tofuinfo.cpp (testTofuPolicy): New.
* qt: Fix some includesAndre Heinecke2016-09-122-3/+5
| | | | | | | | | | | * lang/qt/src/qgpgmekeyformailboxjob.cpp: Explicitly include QStringList. * lang/qt/tests/t-support.h, lang/qt/tests/t-support.cpp: Move includes into impl. Explicitly include QDir. -- This fixes build against Qt versions where the includes are less implicit.
* qt: Fix tofu test.Justus Winter2016-09-121-6/+6
| | | | | | | * lang/qt/tests/t-tofuinfo.cpp: Adjust member names. Fixes-commit: 120b1478 Signed-off-by: Justus Winter <[email protected]>
* qt: Clarify comment and strings in tofuinfo testAndre Heinecke2016-09-051-4/+8
| | | | | * lang/qt/tests/t-tofuinfo.cpp (testTofuSignCount) (testTofuKeyList): Ensure distinct messages. Clarify comment.
* qt: Enable signcount checks in tofuinfo testAndre Heinecke2016-09-051-12/+27
| | | | | | | * lang/qt/tests/t-tofuinfo.cpp: Enable checks for signcount. -- Signcount for userIDs works now as expected with gnupg 2.1.16.
* qt: Fix 2.1 t-support copyAndre Heinecke2016-08-251-1/+3
| | | | * lang/qt/src/t-support.cpp (copyKeyring): Fix seckey copy.
* qt: Fix and extend TofuInfo test.Andre Heinecke2016-08-251-10/+51
| | | | | | | * lang/qt/tests/t-tofuinfo.cpp: Delete executed jobs. (testTofuKeyList): New. (testSupported): Activate for 2.1.16 (signAndVerify): Disable sigcount tests.
* qt: Fix keyring copy in testsAndre Heinecke2016-08-253-3/+3
| | | | | | * lang/qt/test/t-encrypt.cpp, lang/qt/test/t-tofuinfo.cpp: Assert on copy failure. * lang/qt/test/t-support.cpp (copyKeyrings): Fix path.
* qt: Fix tofuinfo test when gpg is gpg2Andre Heinecke2016-08-254-10/+30
| | | | | | | | | | | * lang/qt/tests/t-support.cpp (QGpgMETest::copyKeyrings): New helper. * lang/qt/tests/t-support.h: Declare. * lang/qt/tests/t-encrypt.cpp: use it * lang/qt/tests/t-tofuinbo.cpp: ditto. -- New helper takes care of copying the correct files for either keybox or keyring.
* qt: Remove unused variable in testAndre Heinecke2016-08-251-2/+0
| | | | * t-wkspublish.cpp (testWKSPublishCreate): Remove context.
* qt: Add test for wkspublishjobAndre Heinecke2016-08-252-3/+284
| | | | | | | | | | * lang/qt/tests/t-wkspublish.cpp: New. * lang/qt/tests/Makefile.am: Update accordingly. -- Most tests are disabled by default as tey require an online connection. Define DO_ONLINE_TESTS to enable the tests.
* Qt: Adapt (disabled) tofuinfo test to new APIAndre Heinecke2016-08-241-49/+60
| | | | | | | | * lang/qt/tests/t-tofuinfo.cpp: Switch to UID based API. -- Test is still disabled as GnuPG still returns unexpected results.
* Cpp: Move tofuinfo from signature to useridAndre Heinecke2016-08-231-0/+2
| | | | | | | | | | | | | | * lang/cpp/src/key.cpp (UserID::tofuInfo): New. * lang/cpp/src/key.h: Update accordingly. * lang/cpp/src/tofuinfo.cpp: Remove dropped fields. * lang/cpp/src/tofuinfo.h: Update accordingly. * lang/cpp/src/verificationresult.cpp, lang/cpp/src/verificationresult.h: Remove tofu info. * lang/qt/tests/t-tofuinfo.cpp: Disable for now. -- With be4ff75d7 Tofu info now lives with a UserID Object. While this breaks API it was not yet released.
* Qt: Add test for progress signal of encryptjobAndre Heinecke2016-08-121-0/+62
| | | | | | | | * lang/qt/tests/t-encrypt.cpp (testProgress): New. -- This tests that a ByteArray IODevice now gives proper progress signals.
* Qt: Add KeyForMailboxJobAndre Heinecke2016-08-112-1/+59
| | | | | | | | | | | | | | | | * lang/qt/src/job.cpp: Include moc and make subclass. * lang/qt/src/keyformailboxjob.h, lang/qt/src/qgpgmekeyformailboxjob.cpp, lang/qt/src/qgpgmekeyformailboxjob.h: New. * lang/qt/tests/run-keyformailboxjob.cpp: New manual test. * lang/qt/tests/Makefile.am: Add run-keyformailboxjob. * lang/qt/src/Makefile.am: Update accordingly. * lang/qt/src/protocol.h, lang/qt/src/protocol_p.h: Add keyformailboxjob. -- The KeyForMailboxjob can be used to determine the best key to use to encrypt something to a given mail address.
* Qt: Create TestPassphraseProvider on stackAndre Heinecke2016-08-102-4/+7
| | | | | | | | * lang/qt/tests/t-encrypt.cpp, lang/qt/tests/t-tofuinfo.cpp: Create TestPassphraseProvider on stack. -- Context does not delete the provider. This fixes ASAN errors.
* Qt: Fix t-keylist moc includeAndre Heinecke2016-08-101-1/+0
| | | | | | | | | * lang/qt/tests/t-keylist.cpp: Don't include t-support.moc -- Accidental leftover from trying to generate t-support moc from another cpp file. This was solved instead by a new rule to generate moc files from the header.
* Qt: Clean up debug output in testsAndre Heinecke2016-08-091-2/+1
| | | | | * lang/qt/tests/t-support.cpp: Remove accidentally commited debug output.
* Qt: Add encryption test and refactor testsuiteAndre Heinecke2016-08-098-46/+302
| | | | | | | | | | | | * lang/qt/tests/Makefile.am: Add t-encrypt and t-support. * lang/qt/tests/t-support.cpp, lang/qt/tests/t-support.c (QGpgMETest): New. Class to handle common cleanup / init. * lang/qt/tests/t-keylist.cpp, lang/qt/tests/t-keylocate.cpp, lang/qt/tests/t-ownertrust.cpp, lang/qt/tests/t-tofuinfo.cpp: Inherit QGpgMETest. * lang/qt/tests/t-encrypt.cpp: New. Test Symetric and Asymectric encryption. Mixed encryption test is disabled.
* Qt: Disable keylocate test for gnupg < 2.0.10Andre Heinecke2016-07-141-0/+4
| | | | * lang/qt/tests/t-keylocate.cpp: Disable test for gnupg < 2.0.10
* Qt: Fix usage of ignore-invalid-option in testsAndre Heinecke2016-07-141-4/+4
| | | | * Makefile.am (pubring-stamp): Fix config.
* Qt: Fix tests if gpg2 is gpgAndre Heinecke2016-07-141-1/+7
| | | | | * lang/qt/tests/Makefile.am (pubring-stamp): Loopback and provide passphrase on command line when importing.
* Qt: Fix memleaks in testsAndre Heinecke2016-07-113-0/+20
| | | | | | | | | | * lang/qt/tests/t-keylist.cpp(cleanupTestCase): Ensure that posted events are handled for autodeletion. (testSingleKeylistSync): delete job. * lang/qt/tests/t-ownertrust.cpp(cleanupTestCase): Ditto * lang/qt/tests/t-ownertrust.cpp(testChangeOwnerTrust): Delete keylistjobs. * lang/qt/tests/t-keylocate.cpp(cleanupTestCase): Ditto
* Qt: Disable t-tofuinfo testsAndre Heinecke2016-07-111-5/+1
| | | | | | | | | * lang/qt/tests/t-tofuinfo.cpp: Disable tests. -- Even with the wait this test could fail and anyway the delay was not nice. So we remove the wait hack and just wait for the bug (2405) to be fixed in GnuPG or GpgME core.
* qt: Fix distcheck.Justus Winter2016-07-071-0/+3
| | | | | | | | * lang/qt/src/Makefile.am (qgpgme_headers): Add missing file. (CLEANFILES): Add generated file. * lang/qt/tests/Makefile.am (clean-local): Remove private keys. Signed-off-by: Justus Winter <[email protected]>
* Qt: Add test for publicKeyAlgorithmAsStringAndre Heinecke2016-07-061-0/+22
| | | | * lang/qt/tests/t-keylist.cpp (testPubkeyAlgoAsString): New.
* Qt: Add check for pubkeyAlgo in t-keylistAndre Heinecke2016-07-061-0/+4
| | | | | * lang/qt/tests/t-keylist.cpp (testSingleKeyListSync): Check pubkeyAlgo.
* Qt: Fix include order when buildin testAndre Heinecke2016-07-061-4/+4
| | | | | | | | | * lang/qt/tests/Makefile.am (AM_CPPFLAGS): Include cpp before gpgme src directory. -- This fixes a problem where context.h would be picked up from gpgme/src instead of including the context.h from gpgme++.
* Qt: Fix test build with Qt < 5.4.0Andre Heinecke2016-07-053-4/+4
| | | | | | | * lang/qt/tests/t-keylist.cpp, lang/qt/tests/t-keylocate.cpp, lang/qt/tests/t-ownertrust.cpp: Use old style SIGNAl syntax for QSignalSpy
* Qt: Add testTofuSignCountAndre Heinecke2016-07-041-1/+83
| | | | | | | | | * src/lang/qt/tests/t-tofuinfo.cpp(testTofuSignCount): New. (initTestCase): Set gpg-agent loopback pinentry config. (signAndVerify): Helper for tofuTestSignCount. -- Also needs the wait code because of GnuPG-Bug-Id: 2405
* Qt: Add test passphrase providerAndre Heinecke2016-07-042-1/+48
| | | | | * lang/qt/tests/t-support.h (TestPassphraseProvider): New. * lang/qt/tests/Makefile.am (t_tofuinfo_SOURCES): Add t-support.h
* Qt: Add test for TofuInfoAndre Heinecke2016-07-012-3/+167
| | | | | | | | * lang/qt/tests/t-tofuinfo.cpp: New. * lang/qt/tests/Makefile.am: Update accordingly. -- The test currently contains a workaround for GnuPG-Bug-Id 2405
* Qt: Fix debug output in t-ownertrustAndre Heinecke2016-06-011-1/+3
| | | | | * lang/qt/tests/t-ownertrust.cpp (testChangeOwnerTrust): Remove general debug of trust level. Add debug output for error.
* Qt: Fix test build with clangAndre Heinecke2016-05-241-1/+1
| | | | | | | * lang/qt/tests/Makefile.am (LDADD): Explicitly add -lstdc++ -- g++ does not need that but clang does need it explicitly
* Qt: Add test for changeownertrustAndre Heinecke2016-05-202-3/+109
| | | | | | | | | * lang/qt/tests/t-ownertrust.cpp: New test. * lang/qt/tests/Makefile.am: Add test. -- This test would have catched the issue created by not handling GPGME_STATUS_KEY_CONSIDERED.
* Qt: Fix compilation of unit testsAndre Heinecke2016-05-191-1/+1
| | | | | | | | * lang/qt/tests/Makefile.am (AM_CPPFLAGS): Add -DBUILDING_QGPGME. -- Without building QGpgME the headers of gpgme++ are not included corretly and taken from an already installed gpgme++.
* Qt: Add keyLocateJob and test for itAndre Heinecke2016-05-132-3/+133
| | | | | | | | * configure.ac (LIBQGPGME_LT_REVISION): Bump. * lang/qt/src/protocol.h (locateKeysJob): Add Job. * lang/qt/src/protocol_p.h (locateKeysJob): Implement. * lang/qt/tests/Makefile.am: Add t-keylocate. * lang/qt/tests/t-keylocate.cpp: New.
* Qt: Add missing copyright header in testAndre Heinecke2016-05-131-0/+31
| | | | * lang/qt/tests/t-keylist.cpp: Add copyright header.
* Qt / Cpp: Fix make distgpgmeppAndre Heinecke2016-05-101-1/+1
| | | | | | | | * lang/cpp/src/Makefile.am (EXTRA_DIST): Fix typo. (private_gpgmepp_headers): New. Private headers. (libgpgmepp_la_SOURCES): Add private headers. * lang/qt/src/Makefile.am (t_keylist_SOURCES): Remove non existent header.
* Qt: Add test for async keylistingAndre Heinecke2016-05-101-0/+18
| | | | * src/lang/qt/tests/t-keylist.cpp(KeyListTest::testKeyListAsync): New.
* Qt: Fix unit test by adding initial.test depAndre Heinecke2016-04-113-4/+18
| | | | | | | | | | * lang/qt/tests/t-keylist.cpp: Verify that GNUPGHOME is set. * lang/qt/tests/initial.test: New dummy test. * lang/qt/tests/Makefile.am: Add dependency to initial.test -- Feels weird but this follows the pattern in tests/gpg/Makefile.am and solves the problem that the environment is dirty.