mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-02-25 07:51:48 -05:00
tests: fix createkey test
This commit is contained in:
parent
a9c3d6b507
commit
09529bc47e
@ -27,6 +27,7 @@ public class UncachedKeyringTest {
|
|||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
|
// show Log.x messages in system.out
|
||||||
ShadowLog.stream = System.out;
|
ShadowLog.stream = System.out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,13 +47,11 @@ public class UncachedKeyringTest {
|
|||||||
UncachedKeyRing ring = op.createSecretKeyRing(parcel, log, 0);
|
UncachedKeyRing ring = op.createSecretKeyRing(parcel, log, 0);
|
||||||
|
|
||||||
if (ring == null) {
|
if (ring == null) {
|
||||||
log.print(activity);
|
throw new AssertionError("key creation failed");
|
||||||
throw new AssertionError("oh no");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!"swagerinho".equals(ring.getMasterKeyId())) {
|
if (!"swagerinho".equals(ring.getPublicKey().getPrimaryUserId())) {
|
||||||
log.print(activity);
|
throw new AssertionError("incorrect primary user id");
|
||||||
throw new AssertionError("oh noo");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -66,7 +65,7 @@ public class UncachedKeyringTest {
|
|||||||
UncachedKeyRing canonicalizedRing = inputKeyRing.canonicalize(log, 0);
|
UncachedKeyRing canonicalizedRing = inputKeyRing.canonicalize(log, 0);
|
||||||
|
|
||||||
if (canonicalizedRing == null) {
|
if (canonicalizedRing == null) {
|
||||||
throw new AssertionError("Canonicalization failed; messages: [" + log.toString() + "]");
|
throw new AssertionError("Canonicalization failed; messages: [" + log + "]");
|
||||||
}
|
}
|
||||||
|
|
||||||
HashSet onlyA = new HashSet<KeyringTestingHelper.Packet>();
|
HashSet onlyA = new HashSet<KeyringTestingHelper.Packet>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user