makeInternalTestDataSourceProperties

fun makeInternalTestDataSourceProperties(nodeName: String? = SecureHash.randomSHA256().toString(), nodeNameExtension: String? = null, nodeSchemaName: String? = null, mode: String? = null, configSupplier: (String?, String?) -> <Error class: unknown class> = ::databaseProviderDataSourceConfig, fallBackConfigSupplier: (String?, String?, String?) -> <Error class: unknown class> = ::onDiskH2DataSourceConfig): Properties

Make properties appropriate for creating a DataSource for unit tests. Defaults configuration of in-memory H2 instance. If 'databaseProvider' system property is set then creates a config from the relevant config file is present in resources folder (used to parametrize test to run against a remote database). Properties retrieval can be parameterized by configSupplier and/or fallBackConfigSupplier methods which are run with nodeName and nodeNameExtension parameters.

Parameters

nodeName

Reflects the "instance" of the in-memory database or database username/schema. Defaults to a random string. Passed to configSupplier and fallBackConfigSupplier methods.

nodeNameExtension

Provides additional name extension for configSupplier and fallBackConfigSupplier.

configSupplier

Returns Config with dataSourceProperties, invoked with nodeName. Defaults to configuration created when 'databaseProvider' system property is set.

fallBackConfigSupplier

Returns Config with dataSourceProperties, invoked with nodeName and nodeNameExtension parameters. Defaults to configuration of in-memory H2 instance.