1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-25 13:52:06 +01:00

Remove tests for armor --label

This commit is contained in:
Paul Schaub 2024-03-30 19:07:12 +01:00
parent eeb5986890
commit 0b7511a223
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 0 additions and 18 deletions

View file

@ -16,7 +16,6 @@ import org.bouncycastle.openpgp.PGPSecretKeyRing;
import org.junit.jupiter.api.Test;
import org.pgpainless.PGPainless;
import org.slf4j.LoggerFactory;
import sop.exception.SOPGPException;
public class ArmorCmdTest extends CLITest {
@ -89,15 +88,6 @@ public class ArmorCmdTest extends CLITest {
assertTrue(armored.contains("SGVsbG8sIFdvcmxkIQo="));
}
@Test
public void labelNotYetSupported() throws IOException {
pipeStringToStdin("Hello, World!\n");
ByteArrayOutputStream out = pipeStdoutToStream();
int exitCode = executeCommand("armor", "--label", "Message");
assertEquals(SOPGPException.UnsupportedOption.EXIT_CODE, exitCode);
assertEquals(0, out.size());
}
@Test
public void armorAlreadyArmoredDataIsIdempotent() throws IOException {
pipeStringToStdin(key);

View file

@ -7,22 +7,14 @@ package org.pgpainless.sop;
import org.junit.jupiter.api.Test;
import org.pgpainless.PGPainless;
import org.pgpainless.util.ArmorUtils;
import sop.enums.ArmorLabel;
import sop.exception.SOPGPException;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
public class ArmorTest {
@Test
public void labelIsNotSupported() {
assertThrows(SOPGPException.UnsupportedOption.class, () -> new SOPImpl().armor().label(ArmorLabel.sig));
}
@Test
public void armor() throws IOException {
byte[] data = PGPainless.generateKeyRing().modernKeyRing("Alice").getEncoded();