mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-09 18:29:39 +02:00
Improve error handling in sop tests
This commit is contained in:
parent
24c0cd8a96
commit
7bd12fe5d4
6 changed files with 16 additions and 78 deletions
|
@ -31,6 +31,7 @@ import org.bouncycastle.openpgp.PGPSecretKeyRing;
|
|||
import org.junit.jupiter.api.Test;
|
||||
import org.pgpainless.PGPainless;
|
||||
import org.pgpainless.key.info.KeyRingInfo;
|
||||
import picocli.CommandLine;
|
||||
|
||||
public class ExtractCertTest {
|
||||
|
||||
|
@ -44,7 +45,7 @@ public class ExtractCertTest {
|
|||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
System.setOut(new PrintStream(out));
|
||||
|
||||
PGPainlessCLI.main(new String[] {"extract-cert"});
|
||||
new CommandLine(new PGPainlessCLI()).execute("extract-cert");
|
||||
PGPPublicKeyRing publicKeys = PGPainless.readKeyRing().publicKeyRing(out.toByteArray());
|
||||
KeyRingInfo info = PGPainless.inspectKeyRing(publicKeys);
|
||||
assertFalse(info.isSecretKey());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue