mirror of
https://github.com/corda/corda.git
synced 2025-06-21 16:49:45 +00:00
Contract constraints (#1518)
* Contract constraints and attachment loading Fix compiler warnings. Fixed IdentitySyncFlowTests in confidential-identities. Fixes. Fix AttachmentClassLoaderTests. Added a TODO. Renamed cordapp service. Fix compilation error in java code. Fix RaftNotaryServiceTests Fix AttachmentLoadingTest Fix DistributedServiceTests and LargeTransactionTests. Add cordapp packages to Verifier tests. Refactor DummyContractBackdoor back out of internal package. Resolve compiler warnings. Consolidate excluding `isolated` project at top-level. Fix contract attachment serialisation for remote verifier. Fix integration tests for client:rpc. Contract constraints and attachment loading Fix compiler warnings. Fixed IdentitySyncFlowTests in confidential-identities. Fixes. Fix AttachmentClassLoaderTests. Added a TODO. Renamed cordapp service. Fix compilation error in java code. Fix example compilation. Fix RaftNotaryServiceTests Fix AttachmentLoadingTest Fix DistributedServiceTests and LargeTransactionTests. Add cordapp packages to Verifier tests. Refactor DummyContractBackdoor back out of internal package. Resolve compiler warnings. Consolidate excluding `isolated` project at top-level. Fix integration tests for client:rpc. Fixed issues with node driver and differing ZIPs. Review changes. Refactor GeneratedAttachment into node-api module. Merge branch 'clint/hash-constraint' of https://github.com/corda/corda into clint/hash-constraint Fixed compile error following rebase. wip - test to check that app code isn't loaded from attachments sent over the wire. Use Kotlin copyTo() rather than Apache's IOUtils. Fixes more fixes. Removing unconstrained output. More fixes. Fixed another test. Added missing plugin definition in net.corda.core.node.CordaPluginRegistry: net.corda.finance.contracts.isolated.IsolatedPlugin Re-added missing magic string used in unit test. Remove unused FlowSession variable. * Review fixes. * More review fixes. * Moved Cordapp implementation to an internal package. * More JVMOverloads.
This commit is contained in:
@ -25,14 +25,14 @@ import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
import static java.util.Collections.emptyMap;
|
||||
import static java.util.Collections.singletonList;
|
||||
import static java.util.Collections.*;
|
||||
import static java.util.Objects.requireNonNull;
|
||||
import static kotlin.test.AssertionsKt.assertEquals;
|
||||
import static net.corda.client.rpc.CordaRPCClientConfiguration.getDefault;
|
||||
import static net.corda.finance.Currencies.DOLLARS;
|
||||
import static net.corda.finance.contracts.GetBalances.getCashBalance;
|
||||
import static net.corda.node.services.FlowPermissions.startFlowPermission;
|
||||
import static net.corda.testing.CoreTestUtils.*;
|
||||
import static net.corda.testing.TestConstants.getALICE;
|
||||
|
||||
public class CordaRPCJavaClientTest extends NodeBasedTest {
|
||||
@ -52,6 +52,7 @@ public class CordaRPCJavaClientTest extends NodeBasedTest {
|
||||
|
||||
@Before
|
||||
public void setUp() throws ExecutionException, InterruptedException {
|
||||
setCordappPackages("net.corda.finance.contracts");
|
||||
Set<ServiceInfo> services = new HashSet<>(singletonList(new ServiceInfo(ValidatingNotaryService.Companion.getType(), null)));
|
||||
CordaFuture<StartedNode<Node>> nodeFuture = startNode(getALICE().getName(), 1, services, singletonList(rpcUser), emptyMap());
|
||||
node = nodeFuture.get();
|
||||
@ -62,6 +63,7 @@ public class CordaRPCJavaClientTest extends NodeBasedTest {
|
||||
@After
|
||||
public void done() throws IOException {
|
||||
connection.close();
|
||||
unsetCordappPackages();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -25,6 +25,8 @@ import net.corda.nodeapi.User
|
||||
import net.corda.testing.ALICE
|
||||
import net.corda.testing.chooseIdentity
|
||||
import net.corda.testing.node.NodeBasedTest
|
||||
import net.corda.testing.setCordappPackages
|
||||
import net.corda.testing.unsetCordappPackages
|
||||
import org.apache.activemq.artemis.api.core.ActiveMQSecurityException
|
||||
import org.assertj.core.api.Assertions.assertThatExceptionOfType
|
||||
import org.junit.After
|
||||
@ -49,6 +51,7 @@ class CordaRPCClientTest : NodeBasedTest() {
|
||||
|
||||
@Before
|
||||
fun setUp() {
|
||||
setCordappPackages("net.corda.finance.contracts")
|
||||
node = startNode(ALICE.name, rpcUsers = listOf(rpcUser), advertisedServices = setOf(ServiceInfo(ValidatingNotaryService.type))).getOrThrow()
|
||||
node.internals.registerCustomSchemas(setOf(CashSchemaV1))
|
||||
client = CordaRPCClient(node.internals.configuration.rpcAddress!!, initialiseSerialization = false)
|
||||
@ -57,6 +60,7 @@ class CordaRPCClientTest : NodeBasedTest() {
|
||||
@After
|
||||
fun done() {
|
||||
connection?.close()
|
||||
unsetCordappPackages()
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user