Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reinstate Tessera tests with a fixed version #4303

Merged
merged 2 commits into from
Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import java.util.Optional;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
Expand All @@ -39,7 +38,6 @@
import org.web3j.utils.Restriction;

@RunWith(Parameterized.class)
@Ignore("Ignored since Tessera/Docker container startup causing errors")
public class BftPrivacyClusterAcceptanceTest extends PrivacyAcceptanceTestBase {
private final BftPrivacyType bftPrivacyType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@
import java.io.IOException;
import java.util.Optional;

import org.junit.Ignore;
import org.junit.Test;
import org.web3j.utils.Restriction;

@Ignore("Ignored since Tessera/Docker container startup causing errors")
public class DeployPrivateSmartContractAcceptanceTest extends ParameterizedEnclaveTestBase {

private final PrivacyNode minerNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import org.web3j.utils.Restriction;

@RunWith(Parameterized.class)
@Ignore("Ignored since Tessera/Docker container startup causing errors")
public class EnclaveErrorAcceptanceTest extends PrivacyAcceptanceTestBase {

private final PrivacyNode alice;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@

import com.google.common.collect.Lists;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
Expand All @@ -51,7 +50,6 @@
import org.web3j.tx.Contract;

@RunWith(Parameterized.class)
@Ignore("Ignored since Tessera/Docker container startup causing errors")
public class FlexiblePrivacyAcceptanceTest extends FlexiblePrivacyAcceptanceTestBase {

private final EnclaveType enclaveType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import java.util.Optional;
import javax.annotation.Nonnull;

import org.junit.Ignore;
import org.junit.Test;
import org.web3j.abi.FunctionEncoder;
import org.web3j.abi.TypeReference;
Expand All @@ -49,7 +48,6 @@
import org.web3j.tx.Contract;
import org.web3j.utils.Restriction;

@Ignore("Ignored since Tessera/Docker container startup causing errors")
public class PrivCallAcceptanceTest extends ParameterizedEnclaveTestBase {

private static final int VALUE = 1024;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,13 @@

import org.apache.tuweni.bytes.Bytes32;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import org.testcontainers.containers.Network;

@RunWith(Parameterized.class)
@Ignore("Ignored since Tessera/Docker container startup causing errors")
public class PrivDebugGetStateRootFlexibleGroupAcceptanceTest
extends FlexiblePrivacyAcceptanceTestBase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@
import java.util.Optional;

import org.apache.tuweni.bytes.Bytes32;
import org.junit.Ignore;
import org.junit.Test;
import org.testcontainers.containers.Network;
import org.web3j.utils.Restriction;

@Ignore("Ignored since Tessera/Docker container startup causing errors")
public class PrivDebugGetStateRootOffchainGroupAcceptanceTest extends ParameterizedEnclaveTestBase {

private final PrivacyNode aliceNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@
import java.util.Optional;

import org.apache.tuweni.bytes.Bytes;
import org.junit.Ignore;
import org.junit.Test;
import org.web3j.utils.Restriction;

@Ignore("Ignored since Tessera/Docker container startup causing errors")
public class PrivGetCodeAcceptanceTest extends ParameterizedEnclaveTestBase {

private final PrivacyNode alice;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,12 @@
import java.util.List;
import java.util.Optional;

import org.junit.Ignore;
import org.junit.Test;
import org.web3j.protocol.besu.response.privacy.PrivateTransactionReceipt;
import org.web3j.protocol.core.methods.response.EthLog.LogResult;
import org.web3j.utils.Restriction;

@SuppressWarnings("rawtypes")
@Ignore("Ignored since Tessera/Docker container startup causing errors")
public class PrivGetLogsAcceptanceTest extends ParameterizedEnclaveTestBase {

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@
import java.util.Optional;

import org.apache.tuweni.bytes.Bytes;
import org.junit.Ignore;
import org.junit.Test;
import org.testcontainers.containers.Network;
import org.web3j.utils.Restriction;

@Ignore("Ignored since Tessera/Docker container startup causing errors")
public class PrivGetPrivateTransactionAcceptanceTest extends ParameterizedEnclaveTestBase {

private final PrivacyNode alice;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import io.vertx.core.Vertx;
import org.apache.tuweni.bytes.Bytes;
import org.junit.After;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
Expand All @@ -58,7 +57,6 @@
import org.web3j.utils.Numeric;

@RunWith(Parameterized.class)
@Ignore("Ignored since Tessera/Docker container startup causing errors")
public class PrivacyClusterAcceptanceTest extends PrivacyAcceptanceTestBase {

private final PrivacyNode alice;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import java.util.Optional;

import org.apache.logging.log4j.Level;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
Expand All @@ -46,7 +45,6 @@
import org.web3j.utils.Base64String;

@RunWith(Parameterized.class)
@Ignore("Ignored since Tessera/Docker container startup causing errors")
public class PrivacyGroupAcceptanceTest extends PrivacyAcceptanceTestBase {

private final PrivacyNode alice;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@
import java.util.Optional;

import org.apache.tuweni.bytes.Bytes;
import org.junit.Ignore;
import org.junit.Test;
import org.web3j.utils.Restriction;

@Ignore("Ignored since Tessera/Docker container startup causing errors")
public class PrivacyReceiptAcceptanceTest extends ParameterizedEnclaveTestBase {
final MinerTransactions minerTransactions = new MinerTransactions();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import java.math.BigInteger;
import java.util.Optional;

import org.junit.Ignore;
import org.junit.Test;
import org.testcontainers.containers.Network;
import org.web3j.protocol.besu.response.privacy.PrivateTransactionReceipt;
Expand All @@ -43,7 +42,6 @@
import org.web3j.tx.exceptions.ContractCallException;
import org.web3j.utils.Restriction;

@Ignore("Ignored since Tessera/Docker container startup causing errors")
public class PrivateContractPublicStateAcceptanceTest extends ParameterizedEnclaveTestBase {

private final PrivacyNode transactionNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@
import java.math.BigInteger;
import java.util.Optional;

import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.web3j.protocol.core.methods.response.EthCall;
import org.web3j.utils.Restriction;

@RunWith(Parameterized.class)
@Ignore("Ignored since Tessera/Docker container startup causing errors")
public class PrivateGenesisAcceptanceTest extends ParameterizedEnclaveTestBase {
private final PrivacyNode alice;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@
import java.util.List;
import java.util.Optional;

import org.junit.Ignore;
import org.junit.Test;
import org.web3j.protocol.besu.response.privacy.PrivateTransactionReceipt;
import org.web3j.protocol.core.methods.response.EthLog.LogResult;
import org.web3j.utils.Restriction;

@SuppressWarnings("rawtypes")
@Ignore("Ignored since Tessera/Docker container startup causing errors")
public class PrivateLogFilterAcceptanceTest extends ParameterizedEnclaveTestBase {

private final PrivacyNode node;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@

import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
Expand All @@ -51,7 +50,6 @@
import org.web3j.utils.Restriction;

@RunWith(Parameterized.class)
@Ignore("Ignored since Tessera/Docker container startup causing errors")
public class FlexibleMultiTenancyAcceptanceTest extends FlexiblePrivacyAcceptanceTestBase {

private final EnclaveType enclaveType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public class ContainerTestBase {
// private final String besuImage = "hyperledger/besu:21.7.0-SNAPSHOT";
private final String besuImage = System.getProperty("containertest.imagename");

private final String goQuorumVersion = "22.4.4";
private final String tesseraVersion = "22.1.3";
public static final String GOQUORUM_VERSION = "22.4.4";
public static final String TESSERA_VERSION = "22.1.5";

protected final String goQuorumTesseraPubKey = "3XGBIf+x8IdVQOVfIsbRnHwTYOJP/Fx84G8gMmy8qDM=";
protected final String besuTesseraPubKey = "8JJLEAbq6o9m4Kqm++v0Y1n9Z2ryAFtZTyhnxSKWgws=";
Expand Down Expand Up @@ -127,7 +127,7 @@ public void setUp() throws IOException, InterruptedException {
goQuorumContainer.getMappedPort(goQuorumRpcPort));

waitFor(10, () -> assertClientVersion(besuWeb3j, "besu"));
waitFor(10, () -> assertClientVersion(goQuorumWeb3j, goQuorumVersion));
waitFor(10, () -> assertClientVersion(goQuorumWeb3j, GOQUORUM_VERSION));

// Tell GoQuorum to peer to Besu
goQuorumContainer.execInContainer(
Expand Down Expand Up @@ -187,7 +187,7 @@ private GenericContainer buildGoQuorumTesseraContainer(
final String containerIpcPath,
final String privKeyPath,
final String pubKeyPath) {
return new GenericContainer("quorumengineering/tessera:" + tesseraVersion)
return new GenericContainer("quorumengineering/tessera:" + TESSERA_VERSION)
.withNetwork(containerNetwork)
.withNetworkAliases("goQuorumTessera")
.withClasspathResourceMapping(
Expand All @@ -209,7 +209,7 @@ private GenericContainer buildGoQuorumTesseraContainer(

private GenericContainer buildBesuTesseraContainer(
final String privKeyPath, final String pubKeyPath) {
return new GenericContainer("quorumengineering/tessera:" + tesseraVersion)
return new GenericContainer("quorumengineering/tessera:" + TESSERA_VERSION)
.withNetwork(containerNetwork)
.withNetworkAliases("besuTessera")
.withClasspathResourceMapping(
Expand All @@ -230,7 +230,7 @@ private GenericContainer buildBesuTesseraContainer(

private GenericContainer buildGoQuorumContainer(
final String ipcPath, final String ipcBindDir, final String containerIpcPath) {
return new GenericContainer("quorumengineering/quorum:" + goQuorumVersion)
return new GenericContainer("quorumengineering/quorum:" + GOQUORUM_VERSION)
.withNetwork(containerNetwork)
.dependsOn(tesseraGoQuorumContainer)
.withExposedPorts(goQuorumRpcPort, goQuorumP2pPort)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class TesseraTestHarness implements EnclaveTestHarness {
private URI q2TUri;
private URI thirdPartyUri;

private final String tesseraVersion = "latest";
public static final String TESSERA_VERSION = "22.1.5";

private final int thirdPartyPort = 9081;
private final int q2TPort = 9082;
Expand Down Expand Up @@ -264,7 +264,7 @@ private String buildKeyConfig() {
private GenericContainer buildTesseraContainer(final String configFilePath) {
final String containerConfigFilePath = "/tmp/config.json";
final String keyDir = enclaveConfiguration.getTempDir().toString();
return new GenericContainer<>("quorumengineering/tessera:" + tesseraVersion)
return new GenericContainer<>("quorumengineering/tessera:" + TESSERA_VERSION)
.withCopyFileToContainer(MountableFile.forHostPath(configFilePath), containerConfigFilePath)
.withFileSystemBind(keyDir, containerKeyDir)
.withCommand("--configfile " + containerConfigFilePath)
Expand Down