Align API signature with OS.

This commit is contained in:
josecoll 2018-05-16 18:21:10 +01:00
parent 0cc1b5f4b9
commit b998901da4

View File

@ -85,21 +85,12 @@ open class MockServices private constructor(
* a config from the relevant config file is present in resources folder (used to parametrize test to run against a remote database). * a config from the relevant config file is present in resources folder (used to parametrize test to run against a remote database).
* *
* @param nodeName Reflects the "instance" of the in-memory database or database username/schema. * @param nodeName Reflects the "instance" of the in-memory database or database username/schema.
* Defaults to a random string. Passed to [configSupplier] method. * Defaults to a random string.
* @param nodeNameExtension Provides additional name extension for [configSupplier].
* @param configSupplier Returns [Config] with dataSourceProperties, invoked with [nodeName] and [nodeNameExtension] parameters.
* Defaults to configuration created when 'databaseProvider' system property is set.
*/ */
// TODO: Can we use an X509 principal generator here? fun makeTestDataSourceProperties(nodeName: String = SecureHash.randomSHA256().toString()): Properties {
@JvmStatic return makeTestDataSourceProperties(nodeName, null, ::databaseProviderDataSourceConfig, ::inMemoryH2DataSourceConfig)
fun makeTestDataSourceProperties(nodeName: String = SecureHash.randomSHA256().toString(),
nodeNameExtension: String? = null,
configSupplier: (String, String?) -> Config = ::databaseProviderDataSourceConfig): Properties {
return makeTestDataSourceProperties(nodeName, nodeNameExtension, configSupplier, ::inMemoryH2DataSourceConfig)
} }
/** /**
* Makes database and mock services appropriate for unit tests. * Makes database and mock services appropriate for unit tests.
* *