Enable tests only if test backends are available

This commit is contained in:
Paul Schaub 2023-01-31 18:35:48 +01:00
parent 6fad442cd0
commit 6ac133499c
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
19 changed files with 32 additions and 9 deletions

View File

@ -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

View File

@ -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 {
}

View File

@ -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 {
}

View File

@ -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 {
}

View File

@ -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 {
}

View File

@ -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 {
}

View File

@ -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 {
}

View File

@ -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 {

View File

@ -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 {
}

View File

@ -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 {
}

View File

@ -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() {

View File

@ -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" +

View File

@ -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() {

View File

@ -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() {

View File

@ -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() {

View File

@ -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() {

View File

@ -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() {

View File

@ -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() {

View File

@ -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() {