mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-23 17:22:16 -05:00
Cleanup tests
This commit is contained in:
parent
b67b6b7f87
commit
be199b844c
@ -76,8 +76,7 @@ public class ProviderHelperSaveTest {
|
|||||||
|
|
||||||
@Test public void testImportNoFlagKey() throws Exception {
|
@Test public void testImportNoFlagKey() throws Exception {
|
||||||
|
|
||||||
UncachedKeyRing pub =
|
UncachedKeyRing pub = readRingFromResource("/test-keys/mailvelope_07_no_key_flags.asc");
|
||||||
readRingFromResource("/test-keys/mailvelope_07_no_key_flags.asc");
|
|
||||||
long keyId = pub.getMasterKeyId();
|
long keyId = pub.getMasterKeyId();
|
||||||
Assert.assertNull("key flags should be null", pub.getPublicKey().getKeyUsage());
|
Assert.assertNull("key flags should be null", pub.getPublicKey().getKeyUsage());
|
||||||
|
|
||||||
@ -100,8 +99,7 @@ public class ProviderHelperSaveTest {
|
|||||||
|
|
||||||
@Test public void testImportDivertToCard() throws Exception {
|
@Test public void testImportDivertToCard() throws Exception {
|
||||||
|
|
||||||
UncachedKeyRing sec =
|
UncachedKeyRing sec = readRingFromResource("/test-keys/divert_to_card_sec.asc");
|
||||||
readRingFromResource("/test-keys/divert_to_card_sec.asc");
|
|
||||||
long keyId = sec.getMasterKeyId();
|
long keyId = sec.getMasterKeyId();
|
||||||
|
|
||||||
SaveKeyringResult result;
|
SaveKeyringResult result;
|
||||||
@ -124,8 +122,7 @@ public class ProviderHelperSaveTest {
|
|||||||
|
|
||||||
@Test public void testImportBadEncodedUserId() throws Exception {
|
@Test public void testImportBadEncodedUserId() throws Exception {
|
||||||
|
|
||||||
UncachedKeyRing key =
|
UncachedKeyRing key = readRingFromResource("/test-keys/bad_user_id_encoding.asc");
|
||||||
readRingFromResource("/test-keys/bad_user_id_encoding.asc");
|
|
||||||
long keyId = key.getMasterKeyId();
|
long keyId = key.getMasterKeyId();
|
||||||
|
|
||||||
SaveKeyringResult result;
|
SaveKeyringResult result;
|
||||||
@ -133,8 +130,6 @@ public class ProviderHelperSaveTest {
|
|||||||
result = mProviderHelper.savePublicKeyRing(key, new ProgressScaler());
|
result = mProviderHelper.savePublicKeyRing(key, new ProgressScaler());
|
||||||
Assert.assertTrue("import of keyring should succeed", result.success());
|
Assert.assertTrue("import of keyring should succeed", result.success());
|
||||||
|
|
||||||
// make sure both the CanonicalizedSecretKeyRing as well as the CachedPublicKeyRing correctly
|
|
||||||
// indicate the secret key type
|
|
||||||
CanonicalizedPublicKeyRing ring = mProviderHelper.getCanonicalizedPublicKeyRing(keyId);
|
CanonicalizedPublicKeyRing ring = mProviderHelper.getCanonicalizedPublicKeyRing(keyId);
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
byte[] badUserId = Hex.decode("436c61757320467261656e6b656c203c436c6175732e4672e46e6b656c4068616c696661782e727774682d61616368656e2e64653e");
|
byte[] badUserId = Hex.decode("436c61757320467261656e6b656c203c436c6175732e4672e46e6b656c4068616c696661782e727774682d61616368656e2e64653e");
|
||||||
|
@ -14,5 +14,4 @@ include ':extern:minidns'
|
|||||||
include ':extern:KeybaseLib:Lib'
|
include ':extern:KeybaseLib:Lib'
|
||||||
include ':extern:TokenAutoComplete:library'
|
include ':extern:TokenAutoComplete:library'
|
||||||
include ':extern:openpgp-card-nfc-lib:library'
|
include ':extern:openpgp-card-nfc-lib:library'
|
||||||
include ':extern:safeslinger-exchange'
|
include ':extern:safeslinger-exchange'
|
||||||
include ':OpenKeychain-Test'
|
|
Loading…
Reference in New Issue
Block a user