diff options
author | Maximilian Krambach <[email protected]> | 2018-07-09 09:24:46 +0000 |
---|---|---|
committer | Maximilian Krambach <[email protected]> | 2018-07-09 09:24:46 +0000 |
commit | 67b6fa5a2948deed6a914c638f923fb9ad2eac66 (patch) | |
tree | 8373c672d5b10a4671f2a26944e8f0776a29175b /lang/js/unittests.js | |
parent | js: properly reject pgp message without signature (diff) | |
download | gpgme-67b6fa5a2948deed6a914c638f923fb9ad2eac66.tar.gz gpgme-67b6fa5a2948deed6a914c638f923fb9ad2eac66.zip |
js: reduce request spam at getKeys()
--
* Don't make a secret-Key request for each Key retrieved, use one
request for all of them instead, and assemble the info later. This
should reduce the traffic with large Keyrings. The bulk retrieval
for the public armored Keys for each of these Keys is still up to
discussion
* unittests: disabled assertion for the armored key (as it currently
doesn't work)
* encryptTest: clarified the mechanism/reason of rejection for
Messages >64 MB. This is still a TODO, as this error comes from a
different place (the browser itself) and behaves different from the
other errors.
Diffstat (limited to 'lang/js/unittests.js')
-rw-r--r-- | lang/js/unittests.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lang/js/unittests.js b/lang/js/unittests.js index 169e8ebc..04e15ef3 100644 --- a/lang/js/unittests.js +++ b/lang/js/unittests.js @@ -272,9 +272,9 @@ function unittests (){ keyring.getKeys(null, true).then(function(result){ expect(result).to.be.an('array'); expect(result[0]).to.be.an.instanceof(GPGME_Key); - expect(result[0].get('armored')).to.be.a('string'); - expect(result[0].get('armored')).to.include( - '-----END PGP PUBLIC KEY BLOCK-----'); + expect(result[0].get('hasSecret')).to.be.a('boolean'); + // expect(result[0].get('armored')).to.include( + // '-----END PGP PUBLIC KEY BLOCK-----'); done(); }); } @@ -287,9 +287,11 @@ function unittests (){ function(result){ expect(result).to.be.an('array'); expect(result[0]).to.be.an.instanceof(GPGME_Key); - expect(result[0].get('armored')).to.be.a('string'); - expect(result[0].get('armored')).to.include( - '-----END PGP PUBLIC KEY BLOCK-----'); + expect(result[0].get('hasSecret')).to.be.a('boolean'); + // TODO: preparing sync for armored is still in discussion + // expect(result[0].get('armored')).to.be.a('string'); + // expect(result[0].get('armored')).to.include( + // '-----END PGP PUBLIC KEY BLOCK-----'); done(); } ); |