mirror of
https://codeberg.org/PGPainless/sop-java.git
synced 2024-12-22 12:57:57 +01:00
Enable tests only if test backends are available
This commit is contained in:
parent
6fad442cd0
commit
6ac133499c
19 changed files with 32 additions and 9 deletions
|
@ -17,6 +17,11 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* This implementation of {@link SOPInstanceFactory} reads the JSON file at
|
||||
* <pre>external-sop/src/main/resources/sop/testsuite/external/config.json</pre>
|
||||
* to determine configured external test backends
|
||||
*/
|
||||
public class ExternalSOPInstanceFactory extends SOPInstanceFactory {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
|
||||
package sop.testsuite.external.operation;
|
||||
|
||||
import org.junit.jupiter.api.condition.EnabledIf;
|
||||
import sop.testsuite.operation.ArmorDearmorTest;
|
||||
|
||||
@EnabledIf("sop.testsuite.operation.AbstractSOPTest#hasBackends")
|
||||
public class ExternalArmorDearmorTest extends ArmorDearmorTest {
|
||||
|
||||
}
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
|
||||
package sop.testsuite.external.operation;
|
||||
|
||||
import org.junit.jupiter.api.condition.EnabledIf;
|
||||
import sop.testsuite.operation.DecryptWithSessionKeyTest;
|
||||
|
||||
@EnabledIf("sop.testsuite.operation.AbstractSOPTest#hasBackends")
|
||||
public class ExternalDecryptWithSessionKeyTest extends DecryptWithSessionKeyTest {
|
||||
|
||||
}
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
|
||||
package sop.testsuite.external.operation;
|
||||
|
||||
import org.junit.jupiter.api.condition.EnabledIf;
|
||||
import sop.testsuite.operation.DetachedSignDetachedVerifyTest;
|
||||
|
||||
@EnabledIf("sop.testsuite.operation.AbstractSOPTest#hasBackends")
|
||||
public class ExternalDetachedSignDetachedVerifyTest extends DetachedSignDetachedVerifyTest {
|
||||
}
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
|
||||
package sop.testsuite.external.operation;
|
||||
|
||||
import org.junit.jupiter.api.condition.EnabledIf;
|
||||
import sop.testsuite.operation.EncryptDecryptTest;
|
||||
|
||||
@EnabledIf("sop.testsuite.operation.AbstractSOPTest#hasBackends")
|
||||
public class ExternalEncryptDecryptTest extends EncryptDecryptTest {
|
||||
|
||||
}
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
|
||||
package sop.testsuite.external.operation;
|
||||
|
||||
import org.junit.jupiter.api.condition.EnabledIf;
|
||||
import sop.testsuite.operation.ExtractCertTest;
|
||||
|
||||
@EnabledIf("sop.testsuite.operation.AbstractSOPTest#hasBackends")
|
||||
public class ExternalExtractCertTest extends ExtractCertTest {
|
||||
|
||||
}
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
|
||||
package sop.testsuite.external.operation;
|
||||
|
||||
import org.junit.jupiter.api.condition.EnabledIf;
|
||||
import sop.testsuite.operation.GenerateKeyTest;
|
||||
|
||||
@EnabledIf("sop.testsuite.operation.AbstractSOPTest#hasBackends")
|
||||
public class ExternalGenerateKeyTest extends GenerateKeyTest {
|
||||
|
||||
}
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
|
||||
package sop.testsuite.external.operation;
|
||||
|
||||
import org.junit.jupiter.api.condition.EnabledIf;
|
||||
import sop.testsuite.operation.InlineSignInlineDetachDetachedVerifyTest;
|
||||
|
||||
@EnabledIf("sop.testsuite.operation.AbstractSOPTest#hasBackends")
|
||||
public class ExternalInlineSignInlineDetachDetachedVerifyTest
|
||||
extends InlineSignInlineDetachDetachedVerifyTest {
|
||||
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
|
||||
package sop.testsuite.external.operation;
|
||||
|
||||
import org.junit.jupiter.api.condition.EnabledIf;
|
||||
import sop.testsuite.operation.InlineSignInlineVerifyTest;
|
||||
|
||||
@EnabledIf("sop.testsuite.operation.AbstractSOPTest#hasBackends")
|
||||
public class ExternalInlineSignInlineVerifyTest extends InlineSignInlineVerifyTest {
|
||||
|
||||
}
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
|
||||
package sop.testsuite.external.operation;
|
||||
|
||||
import org.junit.jupiter.api.condition.EnabledIf;
|
||||
import sop.testsuite.operation.VersionTest;
|
||||
|
||||
@EnabledIf("sop.testsuite.operation.AbstractSOPTest#hasBackends")
|
||||
public class ExternalVersionTest extends VersionTest {
|
||||
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ import java.util.stream.Stream;
|
|||
|
||||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||
|
||||
@EnabledIf("sop.operation.AbstractSOPTest#hasBackends")
|
||||
@EnabledIf("sop.testsuite.operation.AbstractSOPTest#hasBackends")
|
||||
public class ArmorDearmorTest {
|
||||
|
||||
static Stream<Arguments> provideInstances() {
|
||||
|
|
|
@ -21,7 +21,7 @@ import java.util.stream.Stream;
|
|||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
@EnabledIf("sop.operation.AbstractSOPTest#hasBackends")
|
||||
@EnabledIf("sop.testsuite.operation.AbstractSOPTest#hasBackends")
|
||||
public class DecryptWithSessionKeyTest extends AbstractSOPTest {
|
||||
|
||||
private static final String CIPHERTEXT = "-----BEGIN PGP MESSAGE-----\n" +
|
||||
|
|
|
@ -24,7 +24,7 @@ import java.util.stream.Stream;
|
|||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
@EnabledIf("sop.operation.AbstractSOPTest#hasBackends")
|
||||
@EnabledIf("sop.testsuite.operation.AbstractSOPTest#hasBackends")
|
||||
public class DetachedSignDetachedVerifyTest extends AbstractSOPTest {
|
||||
|
||||
static Stream<Arguments> provideInstances() {
|
||||
|
|
|
@ -30,7 +30,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
|
|||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
@EnabledIf("sop.operation.AbstractSOPTest#hasBackends")
|
||||
@EnabledIf("sop.testsuite.operation.AbstractSOPTest#hasBackends")
|
||||
public class EncryptDecryptTest extends AbstractSOPTest {
|
||||
|
||||
static Stream<Arguments> provideInstances() {
|
||||
|
|
|
@ -18,7 +18,7 @@ import java.io.InputStream;
|
|||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@EnabledIf("sop.operation.AbstractSOPTest#hasBackends")
|
||||
@EnabledIf("sop.testsuite.operation.AbstractSOPTest#hasBackends")
|
||||
public class ExtractCertTest extends AbstractSOPTest {
|
||||
|
||||
static Stream<Arguments> provideInstances() {
|
||||
|
|
|
@ -16,7 +16,7 @@ import sop.testsuite.TestData;
|
|||
import java.io.IOException;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@EnabledIf("sop.operation.AbstractSOPTest#hasBackends")
|
||||
@EnabledIf("sop.testsuite.operation.AbstractSOPTest#hasBackends")
|
||||
public class GenerateKeyTest extends AbstractSOPTest {
|
||||
|
||||
static Stream<Arguments> provideInstances() {
|
||||
|
|
|
@ -24,7 +24,7 @@ import java.util.stream.Stream;
|
|||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
|
||||
@EnabledIf("sop.operation.AbstractSOPTest#hasBackends")
|
||||
@EnabledIf("sop.testsuite.operation.AbstractSOPTest#hasBackends")
|
||||
public class InlineSignInlineDetachDetachedVerifyTest extends AbstractSOPTest {
|
||||
|
||||
static Stream<Arguments> provideInstances() {
|
||||
|
|
|
@ -26,7 +26,7 @@ import java.util.stream.Stream;
|
|||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
@EnabledIf("sop.operation.AbstractSOPTest#hasBackends")
|
||||
@EnabledIf("sop.testsuite.operation.AbstractSOPTest#hasBackends")
|
||||
public class InlineSignInlineVerifyTest extends AbstractSOPTest {
|
||||
|
||||
static Stream<Arguments> provideInstances() {
|
||||
|
|
|
@ -15,7 +15,7 @@ import java.util.stream.Stream;
|
|||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
@EnabledIf("sop.operation.AbstractSOPTest#hasBackends")
|
||||
@EnabledIf("sop.testsuite.operation.AbstractSOPTest#hasBackends")
|
||||
public class VersionTest extends AbstractSOPTest {
|
||||
|
||||
static Stream<Arguments> provideInstances() {
|
||||
|
|
Loading…
Reference in a new issue