DemoBench operates exclusively on localhost, so no need for public IP. (#919)

This commit is contained in:
Chris Rankin 2017-06-26 10:12:48 +01:00 committed by GitHub
parent 27a8f6fc47
commit 433a9ab5c3
2 changed files with 5 additions and 1 deletions

View File

@ -56,11 +56,12 @@ class NodeConfig(
.withValue("rpcUsers", valueFor(users.map(User::toMap).toList())) .withValue("rpcUsers", valueFor(users.map(User::toMap).toList()))
.withValue("h2port", valueFor(h2Port)) .withValue("h2port", valueFor(h2Port))
.withValue("useTestClock", valueFor(true)) .withValue("useTestClock", valueFor(true))
.withValue("detectPublicIp", valueFor(false))
fun toText(): String = toFileConfig().root().render(renderOptions) fun toText(): String = toFileConfig().root().render(renderOptions)
fun moveTo(baseDir: Path) = NodeConfig( fun moveTo(baseDir: Path) = NodeConfig(
baseDir, legalName, p2pPort, rpcPort, webPort, h2Port, extraServices, users, networkMap baseDir, legalName, p2pPort, rpcPort, webPort, h2Port, extraServices, users, networkMap
) )
fun install(plugins: Collection<Path>) { fun install(plugins: Collection<Path>) {

View File

@ -142,6 +142,7 @@ class NodeConfigTest {
users = listOf(user("jenny")) users = listOf(user("jenny"))
) )
assertEquals(prettyPrint("{" assertEquals(prettyPrint("{"
+ "\"detectPublicIp\":false,"
+ "\"extraAdvertisedServiceIds\":[\"my.service\"]," + "\"extraAdvertisedServiceIds\":[\"my.service\"],"
+ "\"h2port\":30001," + "\"h2port\":30001,"
+ "\"myLegalName\":\"CN=My Name,OU=Corda QA Department,O=R3 CEV,L=New York,C=US\"," + "\"myLegalName\":\"CN=My Name,OU=Corda QA Department,O=R3 CEV,L=New York,C=US\","
@ -169,6 +170,7 @@ class NodeConfigTest {
config.networkMap = NetworkMapConfig(DUMMY_NOTARY.name, 12345) config.networkMap = NetworkMapConfig(DUMMY_NOTARY.name, 12345)
assertEquals(prettyPrint("{" assertEquals(prettyPrint("{"
+ "\"detectPublicIp\":false,"
+ "\"extraAdvertisedServiceIds\":[\"my.service\"]," + "\"extraAdvertisedServiceIds\":[\"my.service\"],"
+ "\"h2port\":30001," + "\"h2port\":30001,"
+ "\"myLegalName\":\"CN=My Name,OU=Corda QA Department,O=R3 CEV,L=New York,C=US\"," + "\"myLegalName\":\"CN=My Name,OU=Corda QA Department,O=R3 CEV,L=New York,C=US\","
@ -210,6 +212,7 @@ class NodeConfigTest {
assertEquals(NetworkMapInfo(localPort(12345), DUMMY_NOTARY.name), fullConfig.networkMapService) assertEquals(NetworkMapInfo(localPort(12345), DUMMY_NOTARY.name), fullConfig.networkMapService)
assertTrue((fullConfig.dataSourceProperties["dataSource.url"] as String).contains("AUTO_SERVER_PORT=30001")) assertTrue((fullConfig.dataSourceProperties["dataSource.url"] as String).contains("AUTO_SERVER_PORT=30001"))
assertTrue(fullConfig.useTestClock) assertTrue(fullConfig.useTestClock)
assertFalse(fullConfig.detectPublicIp)
} }
@Test @Test