PostgresTestConfig class
This class is used to define the default configuration used by Unit Tests to connect to the postgres db.
This class provide three levels of configuration:
environment variables: If an environment variable is found for one of the settings then it overrides any of the following source.
.settings.yaml file If an .settings.yaml file is found then and no environment variable exists then the setting is taking from .settings.yaml
default values If no environment variable exists and the .settings.yaml file doesn't exist then the default value is used.
Default values are contained in: DbSettings.defaultHost DbSettings.defaultPort DbSettings.defaultUsername DbSettings.defaultPassword DbSettings.defaultDbName
Constructors
- PostgresTestConfig()
-
factory
Properties
- connectionUrl → String
-
no setter
- dbName → String
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- host → String
-
no setter
- password → String
-
no setter
- port → int
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- username → String
-
no setter
Methods
-
commandsForModelInstanceTypes(
List< Type> instanceTypes, {bool temporary = false}) → List<String> -
commandsFromDataModel(
ManagedDataModel dataModel, {bool temporary = false}) → List< String> -
contextWithModels(
List< Type> instanceTypes) → Future<ManagedContext> -
databaseConfiguration(
) → DatabaseConfiguration -
dropSchemaTables(
Schema schema, PersistentStore store) → Future -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
persistentStore(
{String? username, String? password, String? host, int? port, String? dbName}) → PostgreSQLPersistentStore -
Returns a
PostgreSQLPersistentStore
that has been initialised using the db settings configured via .settings.yaml You can override all of some of these settings by passing in a non-null value to any of the named arguments. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited