Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…6254) The `postgres_cluster` and `config_psql_dos` fixtures are made available publicly in order to help plugin packages with unit testing. Particularly, these fixtures should make it easy to generate test profiles using the `core.psql_dos` storage plugin, generating the postgres database in a test cluster that is created on-the-fly. The problem was that the interface did not actually allow to configure anything, such as the database name, but this was hardcoded. This would work fine in case it was used just once, but the fixtures could not be used to create a second profile, as the database name would already exist. The `postgres_cluster` fixture is turned into a factory, allowing the database name, username and password to be customized. The unbound method `create_database` is added to the `PGTest` instance that it returns to easily create a new database. The `config_psql_dos` fixture now actually forwards the relevant part of the `custom_configuration` to the `postgres_cluster.create_database` call. Finally, the `aiida_profile_factory` fixture factory now makes the `custom_configuration` argument actually optional, as originally was intended.
- Loading branch information