Changed system and environmental variables to only be parsed as config if they're prefixed with "corda." e.g., to override "p2pPort" would now take a "corda.p2pPort" from system or environmental variables.

This commit is contained in:
sollecitom
2018-03-01 16:37:15 +00:00
parent 36cd34bff5
commit c38dccacca
9 changed files with 32 additions and 18 deletions

View File

@ -15,9 +15,9 @@ import org.junit.rules.ExternalResource
abstract class IntegrationTest {
// System properties set in main 'corda-project' build.gradle
// Note: the database provider configuration file for integration tests should specify:
// dataSource.user = ${nodeOrganizationName}
// dataSource.user = ${custom.nodeOrganizationName}
// dataSource.password = [PASSWORD]
// where [PASSWORD] must be the same for all ${nodeOrganizationName}
// where [PASSWORD] must be the same for all ${custom.nodeOrganizationName}
companion object {
private val DATABASE_PROVIDER = "databaseProvider"
private val dbProvider = System.getProperty(DATABASE_PROVIDER, "")

View File

@ -1,11 +1,11 @@
dataSourceProperties = {
dataSourceClassName = "com.microsoft.sqlserver.jdbc.SQLServerDataSource"
dataSource.url = "jdbc:sqlserver://[HOST]:1433;databaseName=[DATABASE];encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30"
dataSource.user = ${nodeOrganizationName}
dataSource.user = ${custom.nodeOrganizationName}
dataSource.password = "yourStrong(!)Password"
}
database = {
transactionIsolationLevel = READ_COMMITTED
initDatabase = true
schema = ${nodeOrganizationName}
schema = ${custom.nodeOrganizationName}
}

View File

@ -1,10 +1,10 @@
dataSourceProperties = {
dataSourceClassName = "oracle.jdbc.pool.OracleDataSource"
dataSource.url = "jdbc:oracle:thin:@[IP]:[PORT]:xe"
dataSource.user = ${nodeOrganizationName}
dataSource.user = ${custom.nodeOrganizationName}
dataSource.password = 1234
}
database = {
transactionIsolationLevel = READ_COMMITTED
schema = ${nodeOrganizationName}
schema = ${custom.nodeOrganizationName}
}

View File

@ -1,10 +1,10 @@
dataSourceProperties = {
dataSourceClassName = "oracle.jdbc.pool.OracleDataSource"
dataSource.url = "jdbc:oracle:thin:@[IP]:[PORT]:xe"
dataSource.user = ${nodeOrganizationName}
dataSource.user = ${custom.nodeOrganizationName}
dataSource.password = 1234
}
database = {
transactionIsolationLevel = READ_COMMITTED
schema = ${nodeOrganizationName}
schema = ${custom.nodeOrganizationName}
}

View File

@ -1,10 +1,10 @@
dataSourceProperties = {
dataSourceClassName = "org.postgresql.ds.PGSimpleDataSource"
dataSource.url = "jdbc:postgresql://[HOST]:[PORT]/postgres"
dataSource.user = ${nodeOrganizationName}
dataSource.user = ${custom.nodeOrganizationName}
dataSource.password = "1234"
}
database = {
transactionIsolationLevel = READ_COMMITTED
schema = ${nodeOrganizationName}
schema = ${custom.nodeOrganizationName}
}

View File

@ -1,11 +1,11 @@
dataSourceProperties = {
dataSourceClassName = "com.microsoft.sqlserver.jdbc.SQLServerDataSource"
dataSource.url = "jdbc:sqlserver://[HOST]:[PORT]"
dataSource.user = ${nodeOrganizationName}
dataSource.user = ${custom.nodeOrganizationName}
dataSource.password = "yourStrong(!)Password"
}
database = {
transactionIsolationLevel = READ_COMMITTED
initDatabase = true
schema = ${nodeOrganizationName}
schema = ${custom.nodeOrganizationName}
}