docs: Address PR 513 comments

This commit is contained in:
Andras Slemmer
2016-11-22 18:10:50 +00:00
parent 720bb55827
commit 44d1b79ef9
12 changed files with 91 additions and 67 deletions

View File

@ -0,0 +1,9 @@
basedir : "./nameserver"
myLegalName : "Notary Service"
nearestCity : "London"
keyStorePassword : "cordacadevpass"
trustStorePassword : "trustpass"
artemisAddress : "my-network-map:10000"
webAddress : "localhost:10001"
extraAdvertisedServiceIds: ""
useHTTPS : false

View File

@ -1,11 +1,19 @@
basedir : "./standalone/regular-node"
myLegalName : "Some Node"
basedir : "./nodea"
myLegalName : "Bank A"
nearestCity : "London"
keyStorePassword : "cordacadevpass"
trustStorePassword : "trustpass"
artemisAddress : "cordaload-node1:31337"
webAddress : "localhost:31339"
extraAdvertisedServiceIds: ""
dataSourceProperties : {
dataSourceClassName : org.h2.jdbcx.JdbcDataSource
"dataSource.url" : "jdbc:h2:"${basedir}"/persistence"
"dataSource.user" : sa
"dataSource.password" : ""
}
artemisAddress : "my-corda-node:10002"
webAddress : "localhost:10003"
extraAdvertisedServiceIds: "corda.interest_rates"
networkMapAddress : "my-network-map:10000"
useHTTPS : false
devMode : false
networkMapAddress : "cordaload-nameserver:31337"
rpcUsers : [
{ user=user1, password=letmein, permissions=[ StartProtocol.net.corda.protocols.CashProtocol ] }
]

View File

@ -9,15 +9,24 @@ import kotlin.reflect.declaredMemberProperties
class ExampleNodeConfTest {
@Test
fun exampleNodeConfParsesFine() {
val configResource = ExampleNodeConfTest::class.java.classLoader.getResource("example-node.conf")
val nodeConfig = FullNodeConfiguration(
ConfigHelper.loadConfig(
baseDirectoryPath = Paths.get("some-example-base-dir"),
configFileOverride = Paths.get(configResource.toURI())
)
val exampleNodeConfFilenames = arrayOf(
"example-node.conf",
"example-network-map-node.conf"
)
nodeConfig.javaClass.kotlin.declaredMemberProperties.forEach { member ->
member.get(nodeConfig)
exampleNodeConfFilenames.forEach {
println("Checking $it")
val configResource = ExampleNodeConfTest::class.java.classLoader.getResource(it)
val nodeConfig = FullNodeConfiguration(
ConfigHelper.loadConfig(
baseDirectoryPath = Paths.get("some-example-base-dir"),
configFileOverride = Paths.get(configResource.toURI())
)
)
// Force the config fields as they are resolved lazily
nodeConfig.javaClass.kotlin.declaredMemberProperties.forEach { member ->
member.get(nodeConfig)
}
}
}
}