mirror of
https://github.com/vacp2p/linea-besu.git
synced 2026-01-09 15:37:54 -05:00
Re-enable integration tests (#4871)
When Integration tests were migrated to JUnit 5 the gradle configuration was not added. Fix various tests that had broken in the meantime: - NPEs when EnclaveEncryptorType was introduced - Account for new future nonce restrictions in the txpool Signed-off-by: Simon Dudley <simon.dudley@consensys.net> Co-authored-by: Danno Ferrin <danno.ferrin@swirldslabs.com> Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
This commit is contained in:
@@ -344,6 +344,7 @@ subprojects {
|
||||
testClassesDirs = sourceSets.integrationTest.output.classesDirs
|
||||
classpath = sourceSets.integrationTest.runtimeClasspath
|
||||
outputs.upToDateWhen { false }
|
||||
useJUnitPlatform {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import static org.assertj.core.api.Assertions.catchThrowable;
|
||||
import org.hyperledger.besu.enclave.types.PrivacyGroup;
|
||||
import org.hyperledger.besu.enclave.types.ReceiveResponse;
|
||||
import org.hyperledger.besu.enclave.types.SendResponse;
|
||||
import org.hyperledger.enclave.testutil.EnclaveEncryptorType;
|
||||
import org.hyperledger.enclave.testutil.EnclaveKeyConfiguration;
|
||||
import org.hyperledger.enclave.testutil.TesseraTestHarness;
|
||||
import org.hyperledger.enclave.testutil.TesseraTestHarnessFactory;
|
||||
@@ -47,11 +48,11 @@ public class EnclaveTest {
|
||||
|
||||
private static final String PAYLOAD = "a wonderful transaction";
|
||||
private static final String MOCK_KEY = "iOCzoGo5kwtZU0J41Z9xnGXHN6ZNukIa9MspvHtu3Jk=";
|
||||
private static Enclave enclave;
|
||||
private Enclave enclave;
|
||||
private Vertx vertx;
|
||||
private EnclaveFactory factory;
|
||||
|
||||
private static TesseraTestHarness testHarness;
|
||||
private TesseraTestHarness testHarness;
|
||||
|
||||
@BeforeEach
|
||||
public void setUp() throws Exception {
|
||||
@@ -62,7 +63,10 @@ public class EnclaveTest {
|
||||
TesseraTestHarnessFactory.create(
|
||||
"enclave",
|
||||
Files.createTempDirectory(folder, "enclave"),
|
||||
new EnclaveKeyConfiguration("enclave_key_0.pub", "enclave_key_0.key"),
|
||||
new EnclaveKeyConfiguration(
|
||||
new String[] {"enclave_key_0.pub"},
|
||||
new String[] {"enclave_key_0.key"},
|
||||
EnclaveEncryptorType.NOOP),
|
||||
Optional.empty());
|
||||
|
||||
testHarness.start();
|
||||
|
||||
@@ -297,7 +297,7 @@ public class EthGetFilterChangesIntegrationTest {
|
||||
.type(TransactionType.FRONTIER)
|
||||
.gasLimit(100)
|
||||
.gasPrice(Wei.ZERO)
|
||||
.nonce(1)
|
||||
.nonce(0)
|
||||
.payload(Bytes.EMPTY)
|
||||
.to(Address.ID)
|
||||
.value(Wei.of(transactionNumber))
|
||||
|
||||
@@ -47,6 +47,7 @@ import org.hyperledger.besu.ethereum.privacy.RestrictedDefaultPrivacyController;
|
||||
import org.hyperledger.besu.ethereum.privacy.storage.PrivateStateStorage;
|
||||
import org.hyperledger.besu.ethereum.rlp.BytesValueRLPOutput;
|
||||
import org.hyperledger.besu.plugin.data.Restriction;
|
||||
import org.hyperledger.enclave.testutil.EnclaveEncryptorType;
|
||||
import org.hyperledger.enclave.testutil.EnclaveKeyConfiguration;
|
||||
import org.hyperledger.enclave.testutil.TesseraTestHarness;
|
||||
import org.hyperledger.enclave.testutil.TesseraTestHarnessFactory;
|
||||
@@ -127,7 +128,10 @@ public class PrivGetPrivateTransactionIntegrationTest {
|
||||
TesseraTestHarnessFactory.create(
|
||||
"enclave",
|
||||
Files.createTempDirectory(folder, "enclave"),
|
||||
new EnclaveKeyConfiguration("enclave_key_0.pub", "enclave_key_0.key"),
|
||||
new EnclaveKeyConfiguration(
|
||||
new String[] {"enclave_key_0.pub"},
|
||||
new String[] {"enclave_key_0.key"},
|
||||
EnclaveEncryptorType.NOOP),
|
||||
Optional.empty());
|
||||
|
||||
testHarness.start();
|
||||
|
||||
@@ -297,7 +297,7 @@ public class EthGetFilterChangesIntegrationTest {
|
||||
.type(TransactionType.FRONTIER)
|
||||
.gasLimit(100)
|
||||
.gasPrice(Wei.ZERO)
|
||||
.nonce(1)
|
||||
.nonce(0)
|
||||
.payload(Bytes.EMPTY)
|
||||
.to(Address.ID)
|
||||
.value(Wei.of(transactionNumber))
|
||||
|
||||
@@ -50,6 +50,7 @@ import org.hyperledger.besu.evm.gascalculator.SpuriousDragonGasCalculator;
|
||||
import org.hyperledger.besu.evm.precompile.PrecompiledContract;
|
||||
import org.hyperledger.besu.evm.tracing.OperationTracer;
|
||||
import org.hyperledger.besu.evm.worldstate.WorldUpdater;
|
||||
import org.hyperledger.enclave.testutil.EnclaveEncryptorType;
|
||||
import org.hyperledger.enclave.testutil.EnclaveKeyConfiguration;
|
||||
import org.hyperledger.enclave.testutil.TesseraTestHarness;
|
||||
import org.hyperledger.enclave.testutil.TesseraTestHarnessFactory;
|
||||
@@ -123,7 +124,10 @@ public class PrivacyPrecompiledContractIntegrationTest {
|
||||
TesseraTestHarnessFactory.create(
|
||||
"enclave",
|
||||
Files.createTempDirectory(folder, "enclave"),
|
||||
new EnclaveKeyConfiguration("enclave_key_0.pub", "enclave_key_1.key"),
|
||||
new EnclaveKeyConfiguration(
|
||||
new String[] {"enclave_key_0.pub"},
|
||||
new String[] {"enclave_key_1.key"},
|
||||
EnclaveEncryptorType.NOOP),
|
||||
Optional.empty());
|
||||
|
||||
testHarness.start();
|
||||
|
||||
Reference in New Issue
Block a user