-
Notifications
You must be signed in to change notification settings - Fork 376
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
feat: use different database for unit tests #2993
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #2993 +/- ##
===========================================
- Coverage 92.90% 92.87% -0.03%
===========================================
Files 204 204
Lines 10793 10799 +6
===========================================
+ Hits 10027 10030 +3
- Misses 766 769 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
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.
super nice!
Description
I've updated the unit test setup to use a different database than the one used by the local deployment of the Argilla server. In addition, I've updated the pytest fixtures that provided a connection to the DB, and now before executing every test a new transaction is created that gets rollbacked when the execution of the test has finished, leaving no traces in the DB.
Also, I've aligned the SQLAlchemy models metadata with the metadata in the current alembic migrations scripts.
Closes #2987
Type of change
How Has This Been Tested
All the unit tests are passing using this new DB for the tests.
Checklist