mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +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:
@ -23,7 +23,8 @@ class IntegrationTestingTutorial {
|
||||
@Test
|
||||
fun `alice bob cash exchange example`() {
|
||||
// START 1
|
||||
driver(extraCordappPackagesToScan = listOf("net.corda.finance")) {
|
||||
driver(startNodesInProcess = true,
|
||||
extraCordappPackagesToScan = listOf("net.corda.finance.contracts.asset")) {
|
||||
val aliceUser = User("aliceUser", "testPassword1", permissions = setOf(
|
||||
startFlowPermission<CashIssueFlow>(),
|
||||
startFlowPermission<CashPaymentFlow>()
|
||||
|
@ -12,10 +12,7 @@ import net.corda.finance.schemas.CashSchemaV1
|
||||
import net.corda.nodeapi.internal.ServiceInfo
|
||||
import net.corda.node.services.network.NetworkMapService
|
||||
import net.corda.node.services.transactions.ValidatingNotaryService
|
||||
import net.corda.testing.DUMMY_NOTARY
|
||||
import net.corda.testing.DUMMY_NOTARY_KEY
|
||||
import net.corda.testing.chooseIdentity
|
||||
import net.corda.testing.getDefaultNotary
|
||||
import net.corda.testing.*
|
||||
import net.corda.testing.node.MockNetwork
|
||||
import org.junit.After
|
||||
import org.junit.Assert
|
||||
@ -33,6 +30,7 @@ class CustomVaultQueryTest {
|
||||
|
||||
@Before
|
||||
fun setup() {
|
||||
setCordappPackages("net.corda.finance.contracts.asset")
|
||||
mockNet = MockNetwork(threadPerNode = true)
|
||||
val notaryService = ServiceInfo(ValidatingNotaryService.type)
|
||||
notaryNode = mockNet.createNode(
|
||||
@ -52,6 +50,7 @@ class CustomVaultQueryTest {
|
||||
@After
|
||||
fun cleanUp() {
|
||||
mockNet.stopNodes()
|
||||
unsetCordappPackages()
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -105,4 +104,4 @@ class CustomVaultQueryTest {
|
||||
|
||||
return Pair(balancesNodesA, balancesNodesB)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,10 +12,7 @@ import net.corda.node.internal.StartedNode
|
||||
import net.corda.node.services.network.NetworkMapService
|
||||
import net.corda.node.services.transactions.ValidatingNotaryService
|
||||
import net.corda.nodeapi.internal.ServiceInfo
|
||||
import net.corda.testing.DUMMY_NOTARY
|
||||
import net.corda.testing.DUMMY_NOTARY_KEY
|
||||
import net.corda.testing.chooseIdentity
|
||||
import net.corda.testing.getDefaultNotary
|
||||
import net.corda.testing.*
|
||||
import net.corda.testing.node.MockNetwork
|
||||
import org.junit.After
|
||||
import org.junit.Before
|
||||
@ -31,6 +28,7 @@ class FxTransactionBuildTutorialTest {
|
||||
|
||||
@Before
|
||||
fun setup() {
|
||||
setCordappPackages("net.corda.finance.contracts.asset")
|
||||
mockNet = MockNetwork(threadPerNode = true)
|
||||
val notaryService = ServiceInfo(ValidatingNotaryService.type)
|
||||
notaryNode = mockNet.createNode(
|
||||
@ -48,6 +46,7 @@ class FxTransactionBuildTutorialTest {
|
||||
@After
|
||||
fun cleanUp() {
|
||||
mockNet.stopNodes()
|
||||
unsetCordappPackages()
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -12,9 +12,7 @@ import net.corda.node.internal.StartedNode
|
||||
import net.corda.node.services.network.NetworkMapService
|
||||
import net.corda.node.services.transactions.ValidatingNotaryService
|
||||
import net.corda.nodeapi.internal.ServiceInfo
|
||||
import net.corda.testing.DUMMY_NOTARY
|
||||
import net.corda.testing.DUMMY_NOTARY_KEY
|
||||
import net.corda.testing.chooseIdentity
|
||||
import net.corda.testing.*
|
||||
import net.corda.testing.node.MockNetwork
|
||||
import org.junit.After
|
||||
import org.junit.Before
|
||||
@ -35,6 +33,7 @@ class WorkflowTransactionBuildTutorialTest {
|
||||
|
||||
@Before
|
||||
fun setup() {
|
||||
setCordappPackages("net.corda.docs")
|
||||
mockNet = MockNetwork(threadPerNode = true)
|
||||
val notaryService = ServiceInfo(ValidatingNotaryService.type)
|
||||
notaryNode = mockNet.createNode(
|
||||
@ -49,6 +48,7 @@ class WorkflowTransactionBuildTutorialTest {
|
||||
@After
|
||||
fun cleanUp() {
|
||||
mockNet.stopNodes()
|
||||
unsetCordappPackages()
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -101,4 +101,4 @@ class WorkflowTransactionBuildTutorialTest {
|
||||
assertEquals(completedRef, finalFromA)
|
||||
assertEquals(completedRef, finalFromB)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user