- Fixed DatabaseJanitor port type hint to int from str
- Support python 3.7 and up
- Ability to create template database once for the process fixture and re-recreate a clean database out of it every test. Not only it does provide some common db initialisation between tests but also can speed up tests significantly, especially if the initialisation has lots of operations to perform.
- DatabaseJanitor can now define a connection_timeout parameter. How long will it try to connect to database before raising a TimeoutError
- Updated supported python versions
- Unified temporary directory handling in fixture. Settled on tmpdir_factory.
- Fully moved to the Github Actions as CI/CD pipeline
- Deprecated support for logs_prefix process fixture factory argument, --postgresql-logsprefix pytest command line option and postgresql_logsprefix ini configuration option. tmpdir_factory now builds pretty unique temporary directory structure.
- Dropped support for postgresql 9.5 and down
- Removed init_postgresql_database and drop_postgresql_database functions. They were long deprecated and their role perfectly covered by DatabaseJanitor class.
- pytest_postgresql.factories.get_config was moved to pytest_postgresql.config.get_config
- all db_name keywords and attributes were renamed to dbname
- Use postgresql_logsprefix and --postgresql-logsprefix again. They were stopped being used somewhere along the way.
- Sometimes pytest-postrgesql would fail to start postgresql with "FATAL: the database system is starting up" message. It's not really a fatal error, but a message indicating that the process still starts. Now pytest-postgresql will wait properly in this cases.
- [bugfix] To not fail loading code if no postgresql version is installed. Fallback for janitor and process fixture only, if called upon.
- [enhancement] add ability to pass options to pg_ctl's -o flag to send arguments to the underlying postgres executable Use postgres_options as fixture argument, --postgresql-postgres-options as pytest starting option or postgresql_postgres_options as pytest.ini configuration option
- [enhancement] Add ability to set up isolation level for fixture and janitor
- [fix] Status checks for running postgres depend on pg_ctl status code, not on pg_ctl log language. Fixes starting on systems without C locale. Thanks @Martin Meyries.
- [fix] Added LC_* env vars to running initdb and other utilities. Now all tools and server are using same, C locale
- [feature] Ability to define default schema to initialize database with
- [docs] Added more examples to readme on how to use the plugin
- [enhancement] extract NoopExecutor into it's own submodule
- [bugfix] Ignore occasional ProcessFinishedWithError error on executor exit.
- [bugfix] Fixed setting custom password for process fixture
- [bugfix] Fix version detection, to allow for two-digit minor version part
- [feature] Drop support for pyhon 3.5
- [enhancement] require at least mirakuru 2.3.0 (executor's stop method parameter's change)
- [bug] pass password to DatabaseJanitor in client's factory
- [feature] Allow to set password for postgresql. Use it throughout the flow.
- [bugfix] Default Janitor's connections to postgres database. When using custom users, postgres attempts to use user's database and it might not exist.
- [bugfix] NoopExecutor connects to read version by context manager to properly handle cases where it can't connect to the server.
- [bugfix] Fix drop_postgresql_database to actually use DatabaseJanitor.drop instead of an init
- [feature] ability to properly connect to already existing postgresql server using
postgresql_nooproc
fixture.
- [enhancement] Gather helper functions maintaining postgresql database in DatabaseJanitor class.
- [deprecate] Deprecate
init_postgresql_database
in favour ofDatabaseJanitor.init
- [deprecate] Deprecate
drop_postgresql_database
in favour ofDatabaseJanitor.drop
- [feature] Drop support for python 2.7. From now on, only support python 3.5 and up
- [feature] Ability to configure database name through plugin options
- [enhancement] Use tmpdir_factory. Drop
logsdir
parameter - [ehnancement] Support only Postgresql 9.0 and up
- [bugfix] Always start postgresql with LC_ALL, LC_TYPE and LANG set to C.UTF-8. It makes postgresql start in english.
- [bugfix] Allow creating test databse with hyphens
- [enhancements] Ability to configure additional options for postgresql process and connection
- [bugfix] - removed hard dependency on
psycopg2
, allowing any of its alternative packages, likepsycopg2-binary
, to be used. - [maintenance] Drop support for python 3.4 and use 3.7 instead
[bugfix] properly detect if executor running and clean after executor is being stopped
Note
Previously if a test failed, there was a possibility of the executor being removed when python was closing, causing it to print ignored errors on already unloaded modules.
- [enhancement] use executor's context manager to start/stop postrgesql server in a fixture
- [bugfix] version regexp to correctly catch postgresql 10
- [enhancement] explicitly turn off logging_collector
- [feature] pypy compatibility
[bugfix] - disallow connection to database before it gets dropped.
Note
Otherwise it caused random test subprocess to connect again and this the drop was unsucessfull which resulted in many more test failes on setup.
[cleanup] - removed path.py dependency
- [bugfix] - Fixing the default pg_ctl path creation
- [feature] - migrate usage of getfuncargvalue to getfixturevalue. require at least pytest 3.0.0
- create command line and pytest.ini configuration options for postgresql starting parameters
- create command line and pytest.ini configuration options for postgresql username
- make the port random by default
- create command line and pytest.ini configuration options for executable
- create command line and pytest.ini configuration options for host
- create command line and pytest.ini configuration options for port
- Extracted code from pytest-dbfixtures