-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added ability for poetry to add and delete the test_notifications_api db during tests for #598 #913
Conversation
create and delete the test_notifications_api db before and after the tests run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh awesome, thanks @anagradova! This should also help get things back on track for running tests in parallel for the API, right @stvnrlly?
I have just one small thing to try out for keeping our dependencies organized, but otherwise this should be good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Carlo's change is all I see is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @anagradova!
@xlorepdarkhelm, you'll have to approve too now that the change is made. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Installed the python library sqlalchemy-utils which contains the methods database_exists, create_database, drop_database. I modified the _notify_db method in conftest.py to allow for the method to check if the test_notifications_api db exists, if it does it will create it. After all tests run and during deconstruction, the _notify_db method will then remove the test_notifications_api database as part of it's cleanup.
This should include:
Re-introduce database creation for tests #598
NA
Added sqlalchemy-utils to poetry lock
Security Considerations
NA