Skip to content

Commit

Permalink
Removing the orion acceptance tests (hyperledger#3086)
Browse files Browse the repository at this point in the history
* Not executing Orion acceptance tests

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>

* Removing ORION from enclave lists for tests

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
  • Loading branch information
gezero authored and eum602 committed Nov 3, 2023
1 parent f9112cc commit 701cbe3
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package org.hyperledger.besu.tests.acceptance.dsl.privacy;

import static org.hyperledger.enclave.testutil.EnclaveType.NOOP;
import static org.hyperledger.enclave.testutil.EnclaveType.ORION;
import static org.hyperledger.enclave.testutil.EnclaveType.TESSERA;
import static org.web3j.utils.Restriction.RESTRICTED;
import static org.web3j.utils.Restriction.UNRESTRICTED;
Expand Down Expand Up @@ -49,7 +48,6 @@ public static Collection<Object[]> params() {
return Arrays.asList(
new Object[][] {
{RESTRICTED, TESSERA},
{RESTRICTED, ORION},
{UNRESTRICTED, NOOP}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import org.hyperledger.enclave.testutil.EnclaveTestHarness;
import org.hyperledger.enclave.testutil.EnclaveType;
import org.hyperledger.enclave.testutil.NoopEnclaveTestHarness;
import org.hyperledger.enclave.testutil.OrionTestHarnessFactory;
import org.hyperledger.enclave.testutil.TesseraTestHarnessFactory;

import java.io.IOException;
Expand Down Expand Up @@ -293,8 +292,7 @@ private EnclaveTestHarness selectEnclave(

switch (enclaveType) {
case ORION:
return OrionTestHarnessFactory.create(
config.getName(), tempDir, privacyConfiguration.getKeyConfig());
throw new UnsupportedOperationException("The Orion tests are getting deprecated");
case TESSERA:
return TesseraTestHarnessFactory.create(
config.getName(), tempDir, privacyConfiguration.getKeyConfig(), containerNetwork);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,9 @@ public BftPrivacyClusterAcceptanceTest(final BftPrivacyType bftPrivacyType) {
@Parameterized.Parameters(name = "{0}")
public static Collection<BftPrivacyType> bftPrivacyTypes() {
final List<BftPrivacyType> bftPrivacyTypes = new ArrayList<>();
for (EnclaveType x : EnclaveType.values()) {
if (!x.equals(EnclaveType.NOOP)) {
for (ConsensusType consensusType : ConsensusType.values()) {
bftPrivacyTypes.add(new BftPrivacyType(x, consensusType, Restriction.RESTRICTED));
}
for (EnclaveType x : EnclaveType.valuesForTests()) {
for (ConsensusType consensusType : ConsensusType.values()) {
bftPrivacyTypes.add(new BftPrivacyType(x, consensusType, Restriction.RESTRICTED));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@

import java.io.IOException;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Base64;
import java.util.Collection;
import java.util.Optional;
import java.util.stream.Collectors;

import org.apache.tuweni.crypto.sodium.Box;
import org.assertj.core.api.Condition;
Expand All @@ -51,9 +49,7 @@ public class EnclaveErrorAcceptanceTest extends PrivacyAcceptanceTestBase {

@Parameters(name = "{0}")
public static Collection<EnclaveType> enclaveTypes() {
return Arrays.stream(EnclaveType.values())
.filter(enclaveType -> enclaveType != EnclaveType.NOOP)
.collect(Collectors.toList());
return EnclaveType.valuesForTests();
}

public EnclaveErrorAcceptanceTest(final EnclaveType enclaveType) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Supplier;
import java.util.stream.Collectors;

import com.google.common.collect.Lists;
import org.junit.Before;
Expand All @@ -59,9 +58,7 @@ public OnchainPrivacyAcceptanceTest(final EnclaveType enclaveType) {

@Parameters(name = "{0}")
public static Collection<EnclaveType> enclaveTypes() {
return Arrays.stream(EnclaveType.values())
.filter(enclaveType -> enclaveType != EnclaveType.NOOP)
.collect(Collectors.toList());
return EnclaveType.valuesForTests();
}

private PrivacyNode alice;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@
import java.io.IOException;
import java.math.BigInteger;
import java.net.URISyntaxException;
import java.util.Arrays;
import java.util.Collection;
import java.util.Optional;
import java.util.stream.Collectors;

import org.apache.tuweni.bytes.Bytes32;
import org.junit.Before;
Expand All @@ -51,9 +49,7 @@ public PrivDebugGetStateRootOnchainGroupAcceptanceTest(final EnclaveType enclave

@Parameters(name = "{0}")
public static Collection<EnclaveType> enclaveTypes() {
return Arrays.stream(EnclaveType.values())
.filter(enclaveType -> enclaveType != EnclaveType.NOOP)
.collect(Collectors.toList());
return EnclaveType.valuesForTests();
}

private PrivacyNode aliceNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@
import java.io.IOException;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Optional;
import java.util.stream.Collectors;

import io.vertx.core.Vertx;
import org.apache.tuweni.bytes.Bytes;
Expand Down Expand Up @@ -63,9 +61,7 @@ public class PrivacyClusterAcceptanceTest extends PrivacyAcceptanceTestBase {

@Parameters(name = "{0}")
public static Collection<EnclaveType> enclaveTypes() {
return Arrays.stream(EnclaveType.values())
.filter(enclaveType -> enclaveType != EnclaveType.NOOP)
.collect(Collectors.toList());
return EnclaveType.valuesForTests();
}

public PrivacyClusterAcceptanceTest(final EnclaveType enclaveType) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@

import java.io.IOException;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Collection;
import java.util.Optional;
import java.util.stream.Collectors;

import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
Expand All @@ -52,9 +50,7 @@ public class PrivacyGroupAcceptanceTest extends PrivacyAcceptanceTestBase {

@Parameters(name = "{0}")
public static Collection<EnclaveType> enclaveTypes() {
return Arrays.stream(EnclaveType.values())
.filter(enclaveType -> enclaveType != EnclaveType.NOOP)
.collect(Collectors.toList());
return EnclaveType.valuesForTests();
}

public PrivacyGroupAcceptanceTest(final EnclaveType enclaveType) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.hyperledger.enclave.testutil.EnclaveType;

import java.math.BigInteger;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
Expand Down Expand Up @@ -60,9 +59,7 @@ public OnchainMultiTenancyAcceptanceTest(final EnclaveType enclaveType) {

@Parameterized.Parameters(name = "{0}")
public static Collection<EnclaveType> enclaveTypes() {
return Arrays.stream(EnclaveType.values())
.filter(enclaveType -> enclaveType != EnclaveType.NOOP)
.collect(Collectors.toList());
return EnclaveType.valuesForTests();
}

private static final PermissioningTransactions permissioningTransactions =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,19 @@
*/
package org.hyperledger.enclave.testutil;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public enum EnclaveType {
ORION,
TESSERA,
NOOP
NOOP;

public static List<EnclaveType> valuesForTests() {
return Arrays.stream(values())
.filter(enclaveType -> enclaveType != NOOP)
.filter(enclaveType -> enclaveType != ORION)
.collect(Collectors.toList());
}
}

0 comments on commit 701cbe3

Please sign in to comment.