fix unit tests

This commit is contained in:
Vincent Breitmoser
2018-06-24 11:21:52 +02:00
parent 38bf421023
commit 2a5b93d9c5
2 changed files with 3 additions and 6 deletions

View File

@@ -831,9 +831,7 @@ public class PgpEncryptDecryptTest {
{ // decryption with passphrase cached should succeed for the other key if first is gone { // decryption with passphrase cached should succeed for the other key if first is gone
// delete first key from database // delete first key from database
KeyWritableRepository.create(RuntimeEnvironment.application).getContentResolver().delete( KeyWritableRepository.create(RuntimeEnvironment.application).deleteKeyRing(mStaticRing1.getMasterKeyId());
KeyRingData.buildPublicKeyRingUri(mStaticRing1.getMasterKeyId()), null, null
);
ByteArrayOutputStream out = new ByteArrayOutputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream();
ByteArrayInputStream in = new ByteArrayInputStream(ciphertext); ByteArrayInputStream in = new ByteArrayInputStream(ciphertext);
@@ -912,9 +910,7 @@ public class PgpEncryptDecryptTest {
{ // decryption with passphrase cached should succeed for the other key if first is gone { // decryption with passphrase cached should succeed for the other key if first is gone
// delete first key from database // delete first key from database
KeyWritableRepository.create(RuntimeEnvironment.application).getContentResolver().delete( KeyWritableRepository.create(RuntimeEnvironment.application).deleteKeyRing(mStaticRing1.getMasterKeyId());
KeyRingData.buildPublicKeyRingUri(mStaticRing1.getMasterKeyId()), null, null
);
ByteArrayOutputStream out = new ByteArrayOutputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream();
ByteArrayInputStream in = new ByteArrayInputStream(ciphertext); ByteArrayInputStream in = new ByteArrayInputStream(ciphertext);

View File

@@ -244,6 +244,7 @@ public class InteropTest {
KeyRings.buildUnifiedKeyRingsFindBySubkeyUri(verify.getMasterKeyId()) : null; KeyRings.buildUnifiedKeyRingsFindBySubkeyUri(verify.getMasterKeyId()) : null;
KeyWritableRepository helper = new KeyWritableRepository(RuntimeEnvironment.application, KeyWritableRepository helper = new KeyWritableRepository(RuntimeEnvironment.application,
new KeychainDatabase(RuntimeEnvironment.application),
LocalPublicKeyStorage.getInstance(RuntimeEnvironment.application), LocalPublicKeyStorage.getInstance(RuntimeEnvironment.application),
LocalSecretKeyStorage.getInstance(RuntimeEnvironment.application), LocalSecretKeyStorage.getInstance(RuntimeEnvironment.application),
DatabaseNotifyManager.create(RuntimeEnvironment.application), DatabaseNotifyManager.create(RuntimeEnvironment.application),