fix unit tests (canonicalize after create)

This commit is contained in:
Vincent Breitmoser 2015-01-01 18:24:09 +01:00
parent 71c53f13ec
commit bf537c4a81
2 changed files with 5 additions and 0 deletions

View File

@ -113,6 +113,8 @@ public class UncachedKeyringCanonicalizeTest {
staticRing = result.getRing();
Assert.assertNotNull("initial test key creation must succeed", staticRing);
staticRing = staticRing.canonicalize(new OperationLog(), 0).getUncachedKeyRing();
// just for later reference
totalPackets = 9;

View File

@ -34,6 +34,7 @@ import org.spongycastle.jce.provider.BouncyCastleProvider;
import org.spongycastle.util.Strings;
import org.sufficientlysecure.keychain.operations.results.OperationResult;
import org.sufficientlysecure.keychain.operations.results.EditKeyResult;
import org.sufficientlysecure.keychain.operations.results.OperationResult.OperationLog;
import org.sufficientlysecure.keychain.service.SaveKeyringParcel;
import org.sufficientlysecure.keychain.service.SaveKeyringParcel.Algorithm;
import org.sufficientlysecure.keychain.service.SaveKeyringParcel.ChangeUnlockParcel;
@ -104,6 +105,7 @@ public class UncachedKeyringMergeTest {
EditKeyResult result = op.createSecretKeyRing(parcel);
staticRingA = result.getRing();
staticRingA = staticRingA.canonicalize(new OperationLog(), 0).getUncachedKeyRing();
}
{
@ -119,6 +121,7 @@ public class UncachedKeyringMergeTest {
OperationResult.OperationLog log = new OperationResult.OperationLog();
EditKeyResult result = op.createSecretKeyRing(parcel);
staticRingB = result.getRing();
staticRingB = staticRingB.canonicalize(new OperationLog(), 0).getUncachedKeyRing();
}
Assert.assertNotNull("initial test key creation must succeed", staticRingA);