feat: Add cleanup_database
option to postgres fixture.
#219
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note, this could potentially reveal preexisting issues in code under test, that could be perceived as a "breaking" change.
By deleting the database under test at the end of the test's execution, any database connections left connected to the database might cause the
DELETE DATABASE
command to fail.PMR will try to use the
WITH FORCE
option on database versions >= 13.0, but that option does not exist on prior versions of postgres.In any case, if this happens, it is ultimately revealing a "bug" in the code it is testing. Additionally, you can simply turn off database cleanup in one of various ways.