mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
Converted FullNodeConfiguration into a data class and added ability to parse Configs into data classes
This commit is contained in:
@ -95,7 +95,7 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
|
||||
webPort 10007
|
||||
cordapps = []
|
||||
rpcUsers = [
|
||||
['user' : "user",
|
||||
['username' : "user",
|
||||
'password' : "password",
|
||||
'permissions' : ["StartFlow.net.corda.flows.CashFlow"]]
|
||||
]
|
||||
|
@ -18,7 +18,7 @@ networkMapService : {
|
||||
}
|
||||
useHTTPS : false
|
||||
rpcUsers : [
|
||||
{ user=user1, password=letmein, permissions=[ StartProtocol.net.corda.protocols.CashProtocol ] }
|
||||
{ username=user1, password=letmein, permissions=[ StartProtocol.net.corda.protocols.CashProtocol ] }
|
||||
]
|
||||
devMode : true
|
||||
// Certificate signing service will be hosted by R3 in the near future.
|
||||
|
@ -2,6 +2,7 @@ package net.corda.docs
|
||||
|
||||
import net.corda.node.services.config.ConfigHelper
|
||||
import net.corda.node.services.config.FullNodeConfiguration
|
||||
import net.corda.nodeapi.config.parseAs
|
||||
import net.corda.verifier.Verifier
|
||||
import org.junit.Test
|
||||
import java.nio.file.Path
|
||||
@ -30,13 +31,10 @@ class ExampleConfigTest {
|
||||
"example-network-map-node.conf"
|
||||
) {
|
||||
val baseDirectory = Paths.get("some-example-base-dir")
|
||||
FullNodeConfiguration(
|
||||
baseDirectory,
|
||||
ConfigHelper.loadConfig(
|
||||
baseDirectory = baseDirectory,
|
||||
configFile = it
|
||||
)
|
||||
)
|
||||
ConfigHelper.loadConfig(
|
||||
baseDirectory = baseDirectory,
|
||||
configFile = it
|
||||
).parseAs<FullNodeConfiguration>()
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user